Merged in feat/BOOK-747-alert-extra-cost (pull request #3455)
feat(BOOK-747): show extra cost alert if reward night or voucher * feat(BOOK-747): show extra cost alert if reward night or voucher * feat(BOOK-747): use enum * feat(BOOK-747): refactor * feat(BOOK-747): add underline to trigger text Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -3,7 +3,7 @@ import type {
|
||||
SidepeekContent,
|
||||
} from "@scandic-hotels/common/constants/alert"
|
||||
import type { VariantProps } from "class-variance-authority"
|
||||
import type { AriaRole } from "react"
|
||||
import type { AriaRole, ReactNode } from "react"
|
||||
|
||||
import type { alertVariants } from "./variants"
|
||||
|
||||
@@ -27,4 +27,5 @@ export interface AlertProps extends VariantProps<typeof alertVariants> {
|
||||
close?: () => void
|
||||
ariaRole?: AriaRole
|
||||
ariaLive?: "off" | "assertive" | "polite"
|
||||
slot?: ReactNode
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ export function Alert({
|
||||
sidepeekContent,
|
||||
ariaLive,
|
||||
ariaRole,
|
||||
slot,
|
||||
}: AlertProps) {
|
||||
const classNames = alertVariants({
|
||||
className,
|
||||
@@ -93,6 +94,7 @@ export function Alert({
|
||||
sidePeekContent={sidepeekContent}
|
||||
/>
|
||||
) : null}
|
||||
{slot}
|
||||
</div>
|
||||
{close ? (
|
||||
<Button onPress={close} variant="Text" className={styles.closeButton}>
|
||||
|
||||
Reference in New Issue
Block a user