Merged in feat/SW-1751-destination-0-results (pull request #1448)
feat(SW-1751): Added alert if no results are found, also implemented default location data from Contentstack * feat(SW-1751): Added alert if no results are found, also implemented default location data from Contentstack Approved-by: Matilda Landström
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
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"
|
||||
@@ -21,4 +22,6 @@ export interface AlertProps extends VariantProps<typeof alertVariants> {
|
||||
title: string
|
||||
keepSearchParams?: boolean
|
||||
} | null
|
||||
ariaRole?: AriaRole
|
||||
ariaLive?: "off" | "assertive" | "polite"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
"use client"
|
||||
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
|
||||
import Link from "../Link"
|
||||
@@ -19,6 +21,8 @@ export default function Alert({
|
||||
phoneContact,
|
||||
sidepeekCtaText,
|
||||
sidepeekContent,
|
||||
ariaLive,
|
||||
ariaRole,
|
||||
}: AlertProps) {
|
||||
const classNames = alertVariants({
|
||||
className,
|
||||
@@ -31,7 +35,7 @@ export default function Alert({
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<section className={classNames}>
|
||||
<section className={classNames} role={ariaRole} aria-live={ariaLive}>
|
||||
<div className={styles.content}>
|
||||
<span className={styles.iconWrapper}>
|
||||
<Icon className={styles.icon} width={24} height={24} />
|
||||
|
||||
Reference in New Issue
Block a user