diff --git a/CHANGELOG.md b/CHANGELOG.md index 7159a27a..990eec85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.13.2] - 2024-05-26 + +### Added +- adds the ability to set name and email as required fields + ## [Unreleased] ## [1.13.1] - 2024-04-30 diff --git a/manifest.json b/manifest.json index b578d762..6b15386b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "availability-notify", "vendor": "vtex", - "version": "1.13.1", + "version": "1.13.2", "title": "Availability Notify", "description": "Record and send notification when an item is back in stock", "scripts": { diff --git a/react/AvailabilityNotifier.tsx b/react/AvailabilityNotifier.tsx index 54f5bd9e..70a6cf51 100644 --- a/react/AvailabilityNotifier.tsx +++ b/react/AvailabilityNotifier.tsx @@ -25,6 +25,8 @@ interface Props { available?: boolean /* SKU id to notify to */ skuId?: string + nameRequired: boolean + emailRequired: boolean } export interface SellerObj { @@ -185,6 +187,7 @@ function AvailabilityNotifier(props: Props) { })} value={name} onChange={handleNameChange} + required={props.nameRequired} />
@@ -199,6 +202,7 @@ function AvailabilityNotifier(props: Props) { onBlur={() => setDidBlurEmail(true)} error={didBlurEmail && emailError} errorMessage={emailErrorMessage} + required={props.emailRequired} />
@@ -241,4 +245,9 @@ function AvailabilityNotifier(props: Props) { ) } +AvailabilityNotifier.defaultProps = { + nameRequired: false, + emailRequired: false, +} + export default AvailabilityNotifier