Skip to content

Commit

Permalink
docs(types): align type comments with propTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Nov 28, 2023
1 parent 766cb4c commit 0b8babb
Showing 1 changed file with 10 additions and 32 deletions.
42 changes: 10 additions & 32 deletions components/button/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ export interface ButtonProps {
* for identification during testing
*/
dataTest?: string
/**
* Indicates that the button makes potentially dangerous
* deletions or data changes.
* Mutually exclusive with `primary` and `secondary` props
*/
/** Applies 'destructive' button appearance, implying a dangerous action */
destructive?: boolean
/**
* Applies a greyed-out appearance and makes the button non-interactive
Expand All @@ -61,15 +57,9 @@ export interface ButtonProps {
* Gets passed as part of the first argument to callbacks (see `onClick`).
*/
name?: string
/**
* Applies 'primary' button appearance.
* Mutually exclusive with `destructive` and `secondary` props
*/
/** Applies 'primary' button appearance, implying the most important action */
primary?: boolean
/**
* Applies 'secondary' button appearance.
* Mutually exclusive with `primary` and `destructive` props
*/
/** Applies 'secondary' button appearance */
secondary?: boolean
/**
* Makes the button small. Mutually exclusive with `large` prop
Expand Down Expand Up @@ -143,9 +133,7 @@ export interface DropdownButtonProps {
*/
component?: React.ReactElement<any>
dataTest?: string
/**
* Button variant. Mutually exclusive with `primary` and `secondary` props
*/
/** Applies 'destructive' button appearance, implying a dangerous action. */
destructive?: boolean
/**
* Make the button non-interactive
Expand All @@ -165,16 +153,12 @@ export interface DropdownButtonProps {
* Controls popper visibility. When implementing this prop the component becomes a controlled component
*/
open?: boolean
/**
* Button variant. Mutually exclusive with `destructive` and `secondary` props
*/
/** Applies 'primary' button appearance, implying the most important action */
primary?: boolean
/**
* Button variant. Mutually exclusive with `primary` and `destructive` props
*/
/** Applies 'secondary' button appearance */
secondary?: boolean
/**
* Button size. Mutually exclusive with `large` prop
* Changes button size. Mutually exclusive with `large` prop
*/
small?: boolean
tabIndex?: string
Expand Down Expand Up @@ -206,9 +190,7 @@ export interface SplitButtonProps {
*/
component?: React.ReactElement<any>
dataTest?: string
/**
* Applies 'destructive' appearance to indicate purpose. Mutually exclusive with `primary` and `secondary` props
*/
/** Applies 'destructive' button appearance, implying a dangerous action. */
destructive?: boolean
/**
* Disables the button and makes it uninteractive
Expand All @@ -227,13 +209,9 @@ export interface SplitButtonProps {
*/
large?: boolean
name?: string
/**
* Applies 'primary' appearance to indicate purpose. Mutually exclusive with `destructive` and `secondary` props
*/
/** Applies 'primary' button appearance, implying the most important action */
primary?: boolean
/**
* Applies 'secondary' appearance to indicate purpose. Mutually exclusive with `primary` and `destructive` props
*/
/** Applies 'secondary' button appearance */
secondary?: boolean
/**
* Changes button size. Mutually exclusive with `large` prop
Expand Down

0 comments on commit 0b8babb

Please sign in to comment.