Skip to content

Commit

Permalink
Merge pull request #1473 from dhis2/fix/button-prop-types
Browse files Browse the repository at this point in the history
fix(button): fix prop types for button
  • Loading branch information
Chisomchima authored May 27, 2024
2 parents 0d6986b + 2e290c7 commit 46f302c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/button/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type ButtonOpenEventHandler<
Event extends React.SyntheticEvent = React.MouseEvent<HTMLButtonElement>
> = (arg0: ButtonEventPayload & { open: boolean }, event: Event) => void

export interface ButtonProps extends HTMLButtonElement {
export interface BaseButtonProps {
/**
* Component to render inside the button
*/
Expand Down Expand Up @@ -102,6 +102,9 @@ export interface ButtonProps extends HTMLButtonElement {
onKeyDown?: ButtonEventHandler<React.KeyboardEvent<HTMLButtonElement>>
}

export type ButtonProps = BaseButtonProps &
Omit<React.ComponentPropsWithoutRef<'button'>, keyof BaseButtonProps>

export const Button: React.FC<ButtonProps>

export interface ButtonStripProps {
Expand Down

0 comments on commit 46f302c

Please sign in to comment.