Skip to content

Commit

Permalink
refactor button typing
Browse files Browse the repository at this point in the history
  • Loading branch information
fantkolja committed Oct 26, 2023
1 parent dc0543e commit 39fe388
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ui/src/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export type ButtonCommonProps = {
outlineClassName?: string
outline?: ButtonOutlineType
tooltip?: string
} & Pick<HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, 'className' | 'onClick' | 'tabIndex' | 'style'>
} & (ButtonDisabledProps | ButtonNotDisabledProps) &
Pick<HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>, 'className' | 'onClick' | 'tabIndex' | 'style'>

export type ButtonTypeAnchorProps = {
component: 'a'
Expand All @@ -96,8 +97,7 @@ export type ButtonTypeButtonProps = {
target?: never
rel?: never
loading?: boolean
} & (ButtonDisabledProps | ButtonNotDisabledProps) &
Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'autoFocus' | 'type'>
} & Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'autoFocus' | 'type'>

export type ButtonTypeProps = ButtonTypeAnchorProps | ButtonTypeButtonProps

Expand Down

0 comments on commit 39fe388

Please sign in to comment.