Files
web/apps/scandic-web/components/TempDesignSystem/Alert/alert.ts
Tobias Johansson ac493fe325 Merged in feat/SW-1149-handle-status-polling (pull request #1562)
Feat/SW-1149 handle status polling

* feat(SW-1149): move terms and conditions sections to separate component and added copy

* feat(SW-1149): Added client component to handle success callback for payment flow

* fix: check for bookingCompleted status as well

* feat(SW-1587): use alert instead of toast for showing payment errors

* fix: added enum for payment callback status

* fix: proper way of checking for multiple statuses

* fix: update schema type

* fix: use localised link to customer service

* fix: update to use enum for status strings


Approved-by: Arvid Norlin
2025-03-20 07:38:29 +00:00

29 lines
816 B
TypeScript

import type { VariantProps } from "class-variance-authority"
import type { AriaRole } from "react"
import type { AlertTypeEnum } from "@/types/enums/alert"
import type { SidepeekContent } from "@/types/trpc/routers/contentstack/siteConfig"
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"
}