Merged in feature/SW-3515-join-scandic-friends-placeholder (pull request #2883)

feat(SW-3515): display placeholder for join scandic friends

* feat(SW-3515): display placeholder for join scandic friends

* add missing variant config


Approved-by: Linus Flood
This commit is contained in:
Joakim Jäderberg
2025-10-02 13:55:24 +00:00
parent 7fcd5833bd
commit ea5c82fef0
16 changed files with 280 additions and 46 deletions

View File

@@ -17,6 +17,7 @@ import Caption from "@scandic-hotels/design-system/Caption"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import { Input as InputWithLabel } from "@scandic-hotels/design-system/Input"
import { useBookingFlowConfig } from "../../bookingFlowConfig/bookingFlowConfigContext"
import { getErrorMessage } from "./errors"
import styles from "./input.module.css"
@@ -51,6 +52,7 @@ const BookingFlowInput = forwardRef<HTMLInputElement, InputProps>(
) {
const intl = useIntl()
const { control } = useFormContext()
const config = useBookingFlowConfig()
return (
<Controller
@@ -96,7 +98,11 @@ const BookingFlowInput = forwardRef<HTMLInputElement, InputProps>(
{fieldState.error && !hideError ? (
<Caption className={styles.error} fontOnly>
<MaterialIcon icon="info" color="Icon/Feedback/Error" />
{getErrorMessage(intl, fieldState.error.message)}
{getErrorMessage(
intl,
config.variant,
fieldState.error.message
)}
</Caption>
) : null}
</TextField>