Files
web/apps/scandic-web/components/TempDesignSystem/Text/Caption/index.tsx
Hrishikesh Vaipurkar 39b6774269 Merged in feat/SW-1589-implement-booking-code-enter (pull request #1368)
Feat/SW-1589 implement booking code enter

* feat: SW-1589 Booking code rate implementation

* feat: SW-1589 Optimized price display

* feat: SW-1589 Display standard price

* feat: SW-1589 Fixed rate title issue


Approved-by: Niclas Edenvin
2025-03-05 09:32:32 +00:00

39 lines
767 B
TypeScript

import { Slot } from "@radix-ui/react-slot"
import { captionVariants, fontOnlycaptionVariants } from "./variants"
import type { CaptionProps } from "./caption"
export default function Caption({
asChild = false,
className = "",
color,
fontOnly = false,
textAlign,
textTransform,
uppercase,
striked,
type,
...props
}: CaptionProps) {
const Comp = asChild ? Slot : "p"
const classNames = fontOnly
? fontOnlycaptionVariants({
className,
textTransform,
uppercase,
striked,
type,
})
: captionVariants({
className,
color,
textTransform,
textAlign,
uppercase,
striked,
type,
})
return <Comp className={classNames} {...props} />
}