Merged in chore/SW-3246-move-alert-to-design-system (pull request #2698)
chore(SW-3246): Moved Alert component into design system * chore(SW-3246): Moved Alert component into design system * chore(SW-3246): Optimsed code and imports * chore(SW-3246): Moved type AlertTypeEnum and other to common package Approved-by: Anton Gunnarsson
This commit is contained in:
30
packages/design-system/lib/components/Alert/alert.ts
Normal file
30
packages/design-system/lib/components/Alert/alert.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import type {
|
||||
AlertTypeEnum,
|
||||
SidepeekContent,
|
||||
} from '@scandic-hotels/common/constants/alert'
|
||||
import type { VariantProps } from 'class-variance-authority'
|
||||
import type { AriaRole } from 'react'
|
||||
|
||||
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?: SidepeekContent | null
|
||||
sidepeekCtaText?: string | null
|
||||
link?: {
|
||||
url: string
|
||||
title: string
|
||||
keepSearchParams?: boolean
|
||||
} | null
|
||||
close?: () => void
|
||||
ariaRole?: AriaRole
|
||||
ariaLive?: 'off' | 'assertive' | 'polite'
|
||||
}
|
||||
Reference in New Issue
Block a user