feat(SW-556): add surprise notification component

This commit is contained in:
Christian Andolf
2024-10-08 17:18:20 +02:00
parent 0898ff3cd4
commit 3206319254
20 changed files with 723 additions and 65 deletions
@@ -0,0 +1,32 @@
import { Slot } from "@radix-ui/react-slot"
import { captionVariants, fontOnlycaptionVariants } from "./variants"
import type { CaptionLabelProps } from "./captionLabel"
export default function CaptionLabel({
asChild = false,
className = "",
color,
fontOnly = false,
textAlign,
textTransform,
uppercase,
...props
}: CaptionLabelProps) {
const Comp = asChild ? Slot : "span"
const classNames = fontOnly
? fontOnlycaptionVariants({
className,
textTransform,
uppercase,
})
: captionVariants({
className,
color,
textTransform,
textAlign,
uppercase,
})
return <Comp className={classNames} {...props} />
}