Skip to content

Commit

Permalink
feat: added text overrides on GuestForm
Browse files Browse the repository at this point in the history
Signed-off-by: Haris Spahija <haris.spahija@pon.com>
  • Loading branch information
HarisSpahijaPon committed Nov 21, 2019
1 parent 162293c commit ca65614
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions package/src/components/GuestForm/v1/GuestForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ class GuestForm extends Component {
*/
TextInput: CustomPropTypes.component.isRequired
}).isRequired,
/**
* The text for the "Email address" label text.
*/
emailLabelText: PropTypes.string,
/**
* The text for the "Email address" placeholder text.
*/
emailPlaceholderText: PropTypes.string,
/**
* Errors array
*/
Expand Down Expand Up @@ -112,7 +120,9 @@ class GuestForm extends Component {
validator: getRequiredValidator("email"),
value: {
email: ""
}
},
emailLabelText: "Email address",
emailPlaceholderText: "Email address"
};

_form = null;
Expand All @@ -132,6 +142,8 @@ class GuestForm extends Component {
buttonText,
className,
components: { Button, ErrorsBlock, Field, TextInput },
emailLabelText,
emailPlaceholderText,
errors,
helpText,
isSaving,
Expand All @@ -153,8 +165,8 @@ class GuestForm extends Component {
validator={validator}
value={value}
>
<Field name="email" label="Email Address" isRequired helpText={helpText}>
<TextInput id={emailInputId} isReadOnly={isSaving} name="email" placeholder="Email address"
<Field name="email" label={emailLabelText} isRequired helpText={helpText}>
<TextInput id={emailInputId} isReadOnly={isSaving} name="email" placeholder={emailPlaceholderText}
type="email"
/>
<ErrorsBlock names={["email"]} />
Expand Down

0 comments on commit ca65614

Please sign in to comment.