30 lines
853 B
TypeScript
30 lines
853 B
TypeScript
import type { AlertTypeEnum } from "@scandic-hotels/common/constants/alert"
|
|
import type { VariantProps } from "class-variance-authority"
|
|
import type { AriaRole, ReactNode } from "react"
|
|
|
|
import { AlertSidepeekContent } from "../../types/sidepeekContent"
|
|
import type { alertVariants } from "./variants"
|
|
|
|
export interface AlertProps extends VariantProps<typeof alertVariants> {
|
|
className?: string
|
|
type: AlertTypeEnum
|
|
heading?: string | null
|
|
text?: string | null
|
|
phoneContact?: {
|
|
displayText: string
|
|
phoneNumber?: string
|
|
footnote?: string | null
|
|
} | null
|
|
sidepeekContent?: AlertSidepeekContent | null
|
|
sidepeekCtaText?: string | null
|
|
link?: {
|
|
url: string
|
|
title: string
|
|
keepSearchParams?: boolean
|
|
} | null
|
|
close?: () => void
|
|
ariaRole?: AriaRole
|
|
ariaLive?: "off" | "assertive" | "polite"
|
|
slot?: ReactNode
|
|
}
|