Skip to content

Commit

Permalink
feat(components): claire's review
Browse files Browse the repository at this point in the history
  • Loading branch information
maximeperrault authored and maximeperraultdev committed Jul 1, 2024
1 parent c8e102e commit 7622665
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/fields/PhoneInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export type PhoneInputProps = {
isLabelHidden?: boolean
isLight?: boolean
isRequired?: boolean
isSearchInput?: boolean
isTransparent?: boolean
isUndefinedWhenDisabled?: boolean
label: string
Expand All @@ -38,6 +37,8 @@ export const PhoneInput = forwardRef<HTMLInputElement, PhoneInputProps>(
{
disabled = false,
error,
isErrorMessageHidden = false,
isLabelHidden = false,
isLight = false,
isRequired = false,
isTransparent = false,
Expand All @@ -54,7 +55,7 @@ export const PhoneInput = forwardRef<HTMLInputElement, PhoneInputProps>(

return (
<Field className="Field-PhoneInput">
<Label $isRequired={isRequired} disabled={disabled} htmlFor={name}>
<Label $isRequired={isRequired} disabled={disabled} htmlFor={name} isHidden={isLabelHidden}>
{label}
</Label>
<StyledIMaskInput
Expand Down Expand Up @@ -87,7 +88,7 @@ export const PhoneInput = forwardRef<HTMLInputElement, PhoneInputProps>(
value={value}
{...props}
/>
{!!error && <FieldError>{error}</FieldError>}
{!isErrorMessageHidden && !!error && <FieldError>{error}</FieldError>}
</Field>
)
}
Expand Down

0 comments on commit 7622665

Please sign in to comment.