Skip to content

Commit

Permalink
rename buttonBaseProps
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanWatanabe committed Jun 18, 2021
1 parent 43f9679 commit 7591bf2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/react-button/src/buttonBaseProps.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ButtonProps } from './Button';
import { PropDefinition } from './Playground.types';

type ExampleProps = { iconOnly?: string };

export const buttonBaseProps: PropDefinition<ButtonProps & ExampleProps>[] = [
{ propName: 'content', propType: 'string', defaultValue: 'This is a button', dependsOnProps: ['~iconOnly'] },
{ propName: 'disabled', propType: 'boolean' },
{ propName: 'icon', propType: 'boolean' },
{ propName: 'iconOnly', propType: 'boolean', dependsOnProps: ['icon'] },
{
propName: 'iconPosition',
propType: ['before', 'after'],
defaultValue: 'before',
dependsOnProps: ['icon', '~iconOnly'],
},
{ propName: 'primary', propType: 'boolean', dependsOnProps: ['~subtle', '~transparent'] },
{ propName: 'size', propType: ['small', 'medium', 'large'], defaultValue: 'medium' },
{ propName: 'subtle', propType: 'boolean', dependsOnProps: ['~primary', '~transparent'] },
{ propName: 'transparent', propType: 'boolean', dependsOnProps: ['~primary', '~subtle'] },
];

0 comments on commit 7591bf2

Please sign in to comment.