feat(WEB-304): remaning UI from design system primitives
This commit is contained in:
@@ -1,17 +1,23 @@
|
||||
import { Slot } from "@radix-ui/react-slot"
|
||||
|
||||
import { biroScriptVariants } from "./variants"
|
||||
|
||||
import type { BiroScriptProps } from "./biroScript"
|
||||
|
||||
export default function BiroScript({
|
||||
children,
|
||||
asChild = false,
|
||||
className,
|
||||
color,
|
||||
textAlign,
|
||||
type,
|
||||
...props
|
||||
}: BiroScriptProps) {
|
||||
const Comp = asChild ? Slot : "span"
|
||||
const classNames = biroScriptVariants({
|
||||
className,
|
||||
color,
|
||||
textAlign,
|
||||
type,
|
||||
})
|
||||
return <span className={classNames}>{children}</span>
|
||||
return <Comp className={classNames} {...props} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user