24 lines
470 B
TypeScript
24 lines
470 B
TypeScript
import { Slot } from "@radix-ui/react-slot"
|
|
|
|
import { biroScriptVariants } from "./variants"
|
|
|
|
import type { BiroScriptProps } from "./biroScript"
|
|
|
|
export default function BiroScript({
|
|
asChild = false,
|
|
className,
|
|
color,
|
|
textAlign,
|
|
type,
|
|
...props
|
|
}: BiroScriptProps) {
|
|
const Comp = asChild ? Slot : "span"
|
|
const classNames = biroScriptVariants({
|
|
className,
|
|
color,
|
|
textAlign,
|
|
type,
|
|
})
|
|
return <Comp className={classNames} {...props} />
|
|
}
|