-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6b5e54
commit 8b92808
Showing
1 changed file
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# Button | ||
|
||
|
||
## Import | ||
``` | ||
import { Button } from 'wri-design-systems' | ||
``` | ||
|
||
## Usage | ||
|
||
``` | ||
<Button | ||
label='Save and Download' | ||
variant='primary' | ||
/> | ||
``` | ||
|
||
### Props | ||
``` | ||
type ButtonProps = Omit< | ||
ChakraButtonProps, | ||
'size' | 'variant' | 'colorScheme' | ||
> & { | ||
label?: string | ||
isLoading?: boolean | ||
variant: 'primary' | 'secondary' | 'borderless' | 'outline' | ||
size?: 'default' | 'small' | ||
isDisabled?: boolean | ||
} | ||
``` | ||
|
||
|
||
## Button Variants | ||
|
||
### Primary | ||
``` | ||
<Button | ||
label='Primary' | ||
variant='primary' | ||
/> | ||
``` | ||
|
||
### Secondary | ||
``` | ||
<Button | ||
label='Secondary' | ||
variant='secondary' | ||
/> | ||
``` | ||
|
||
### Borderless | ||
``` | ||
<Button | ||
label='Borderless' | ||
variant='borderless' | ||
/> | ||
``` | ||
|
||
### Outline | ||
``` | ||
<Button | ||
label='Outline' | ||
variant='outline' | ||
/> | ||
``` | ||
|
||
## Button Sizes | ||
|
||
### Default | ||
``` | ||
<Button | ||
label="Primary" | ||
size="default" | ||
variant="primary" | ||
/> | ||
``` | ||
|
||
### Small | ||
``` | ||
<Button | ||
label="Primary" | ||
size="small" | ||
variant="primary" | ||
/> | ||
``` | ||
|
||
## Button with Icon | ||
|
||
### Left Icon | ||
``` | ||
<Button | ||
label="Outline" | ||
leftIcon={<SettingsIcon />} | ||
variant="primary" | ||
/> | ||
``` | ||
|
||
### Right Icon | ||
``` | ||
<Button | ||
label="Outline" | ||
rightIcon={<SettingsIcon />} | ||
variant="primary" | ||
/> | ||
``` | ||
|
||
## Other Props | ||
|
||
### Disabled | ||
``` | ||
<Button | ||
label="Primary" | ||
variant="primary" | ||
isDisabled | ||
/> | ||
``` | ||
|
||
### Loading state | ||
``` | ||
<Button | ||
label="Primary" | ||
variant="primary" | ||
isLoading | ||
/> | ||
``` |