Merged in feat/use-new-input-component (pull request #3324)
feat(SW-3659): Use new input component * Use new input component * Update error formatter * Merged master into feat/use-new-input-component * Merged master into feat/use-new-input-component * Merge branch 'master' into feat/use-new-input-component * Merged master into feat/use-new-input-component * Update Input stories * Merge branch 'feat/use-new-input-component' of bitbucket.org:scandic-swap/web into feat/use-new-input-component * Update Storybook logo * Add some new demo icon input story * Fix the clear content button position * Fix broken password input icon * Merged master into feat/use-new-input-component * Merged master into feat/use-new-input-component * Add aria-hidden to required asterisk * Merge branch 'feat/use-new-input-component' of bitbucket.org:scandic-swap/web into feat/use-new-input-component * Merge branch 'master' into feat/use-new-input-component Approved-by: Bianca Widstam Approved-by: Matilda Landström
This commit is contained in:
@@ -6,17 +6,20 @@ import { getDefaultCountryFromLang } from "@scandic-hotels/common/utils/phone"
|
||||
import { Divider } from "@scandic-hotels/design-system/Divider"
|
||||
import CountrySelect from "@scandic-hotels/design-system/Form/Country"
|
||||
import DateSelect from "@scandic-hotels/design-system/Form/Date"
|
||||
import { FormInput } from "@scandic-hotels/design-system/Form/FormInput"
|
||||
import Phone from "@scandic-hotels/design-system/Form/Phone"
|
||||
import { FormSelect } from "@scandic-hotels/design-system/Form/Select"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { getLocalizedLanguageOptions } from "@/constants/languages"
|
||||
|
||||
import Input from "@/components/TempDesignSystem/Form/Input"
|
||||
import PasswordInput from "@/components/TempDesignSystem/Form/PasswordInput"
|
||||
import useLang from "@/hooks/useLang"
|
||||
import { getFormattedCountryList } from "@/utils/countries"
|
||||
import { getErrorMessage } from "@/utils/getErrorMessage"
|
||||
import {
|
||||
formatFormErrorMessage,
|
||||
getErrorMessage,
|
||||
} from "@/utils/getErrorMessage"
|
||||
|
||||
import styles from "./formContent.module.css"
|
||||
|
||||
@@ -63,7 +66,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
name="dateOfBirth"
|
||||
registerOptions={{ required: true }}
|
||||
/>
|
||||
<Input
|
||||
<FormInput
|
||||
data-hj-suppress
|
||||
label={`${intl.formatMessage({
|
||||
id: "common.address",
|
||||
@@ -71,7 +74,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
})} 1`}
|
||||
name="address.streetAddress"
|
||||
/>
|
||||
<Input
|
||||
<FormInput
|
||||
data-hj-suppress
|
||||
label={intl.formatMessage({
|
||||
id: "common.city",
|
||||
@@ -80,12 +83,13 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
name="address.city"
|
||||
/>
|
||||
<div className={styles.container}>
|
||||
<Input
|
||||
<FormInput
|
||||
data-hj-suppress
|
||||
label={intl.formatMessage({
|
||||
id: "common.zipCode",
|
||||
defaultMessage: "Zip code",
|
||||
})}
|
||||
errorFormatter={formatFormErrorMessage}
|
||||
name="address.zipCode"
|
||||
registerOptions={{ required: true }}
|
||||
/>
|
||||
@@ -105,7 +109,7 @@ export default function FormContent({ errors }: { errors: FieldErrors }) {
|
||||
registerOptions={{ required: true }}
|
||||
/>
|
||||
</div>
|
||||
<Input
|
||||
<FormInput
|
||||
label={intl.formatMessage({
|
||||
id: "common.emailAddress",
|
||||
defaultMessage: "Email address",
|
||||
|
||||
Reference in New Issue
Block a user