Files
web/components/TempDesignSystem/Subtitle/index.tsx
2024-05-30 17:56:56 +02:00

22 lines
421 B
TypeScript

import { subtitleVariants } from "./variants"
import type { SubtitleProps } from "./subtitle"
export default function Subtitle({
children,
className = "",
color,
hideEmpty = true,
textTransform,
}: SubtitleProps) {
if (hideEmpty && !children) {
return null
}
const classNames = subtitleVariants({
className,
color,
textTransform,
})
return <p className={classNames}>{children}</p>
}