chore: SW-3145 Moved tempdesign button to design-system * chore: SW-3145 Moved tempdesign button to design-system Approved-by: Anton Gunnarsson
21 lines
674 B
TypeScript
21 lines
674 B
TypeScript
import type { VariantProps } from 'class-variance-authority'
|
|
import type { ButtonProps as ReactAriaButtonProps } from 'react-aria-components'
|
|
|
|
import type { buttonVariants } from './variants'
|
|
|
|
export interface ButtonPropsRAC
|
|
extends Omit<ReactAriaButtonProps, 'isDisabled' | 'onClick'>,
|
|
VariantProps<typeof buttonVariants> {
|
|
asChild?: false | undefined | never
|
|
disabled?: ReactAriaButtonProps['isDisabled']
|
|
onClick?: ReactAriaButtonProps['onPress']
|
|
}
|
|
|
|
export interface ButtonPropsSlot
|
|
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
VariantProps<typeof buttonVariants> {
|
|
asChild: true
|
|
}
|
|
|
|
export type ButtonProps = ButtonPropsSlot | ButtonPropsRAC
|