Files
web/packages/design-system/lib/components/FakeButton/index.tsx
Erik Tiekstra 6730575f7a feat(BOOK-113): Synced hover/focus states for buttons and added better examples to storybook
* fix(BOOK-113): Updated hover colors after blend/mix has been removed

Approved-by: Christel Westerberg
2025-12-03 10:45:34 +00:00

44 lines
741 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,
children,
className,
isHovered,
isDisabled,
...props
}: FakeButtonProps) {
const classNames = variants({
color,
size,
variant,
typography,
isHovered,
className,
})
return (
<span
className={cx(classNames)}
data-disabled={isDisabled || undefined}
{...props}
>
{children}
</span>
)
}