Merged in chore/SW-3145-move-country (pull request #2545)
chore: SW-3145 Moved country into design system * chore: SW-3145 Moved country into design system Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -16,14 +16,15 @@ import {
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import Body from "@scandic-hotels/design-system/Body"
|
||||
import { ErrorMessage } from "@scandic-hotels/design-system/Form/ErrorMessage"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { Input } from "@scandic-hotels/design-system/Input"
|
||||
import { Label } from "@scandic-hotels/design-system/Label"
|
||||
|
||||
import { getDefaultCountryFromLang } from "@/constants/languages"
|
||||
|
||||
import ErrorMessage from "@/components/TempDesignSystem/Form/ErrorMessage"
|
||||
import useLang from "@/hooks/useLang"
|
||||
import { getErrorMessage } from "@/utils/getErrorMessage"
|
||||
|
||||
import styles from "./phone.module.css"
|
||||
|
||||
@@ -149,7 +150,14 @@ export default function Phone({
|
||||
readOnly={readOnly}
|
||||
type="tel"
|
||||
/>
|
||||
<ErrorMessage errors={formState.errors} name={name} />
|
||||
<ErrorMessage
|
||||
errors={formState.errors}
|
||||
name={name}
|
||||
messageLabel={getErrorMessage(
|
||||
intl,
|
||||
formState.errors[name]?.message?.toString()
|
||||
)}
|
||||
/>
|
||||
</TextField>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user