Merged in chore/SW-3145-move-button (pull request #2527)
chore: SW-3145 Moved tempdesign button to design-system * chore: SW-3145 Moved tempdesign button to design-system Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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
|
||||
Reference in New Issue
Block a user