Files
web/packages/design-system/lib/components/FakeButton/index.tsx
2025-12-16 14:37:10 +00:00

47 lines
773 B
TypeScript

'use client'
import { variants } from './variants'
import { cx, type VariantProps } from 'class-variance-authority'
import type { HTMLAttributes } from 'react'
interface FakeButtonProps
extends
Omit<HTMLAttributes<HTMLSpanElement>, 'color'>,
VariantProps<typeof variants> {
isDisabled?: boolean
}
export function FakeButton({
variant,
color,
size,
typography,
fullWidth,
children,
className,
isHovered,
isDisabled,
...props
}: FakeButtonProps) {
const classNames = variants({
color,
size,
variant,
typography,
fullWidth,
isHovered,
className,
})
return (
<span
className={cx(classNames)}
data-disabled={isDisabled || undefined}
{...props}
>
{children}
</span>
)
}