|
| 1 | +## Button |
| 2 | + |
| 3 | +The base button component. |
| 4 | + |
| 5 | +### Properties |
| 6 | +| Name | Type | Default | Description | |
| 7 | +|:-----|:-----|:-----|:-----| |
| 8 | +| `children` | `Any` | `null` | All child component to be rendered inside a button | |
| 9 | +| `type` | `String` | `default` | Represents the style to be applied for the button. Possible values are 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', and 'dark' | |
| 10 | +| `size` | `String` | `medium` | Defines the size of the button. Possible values are 'small', 'medium', and 'large' | |
| 11 | +| `className` | `String` | `''` | Set a class to style the Component | |
| 12 | +| `href` | `String` | `null` | Creates a link for the button. | |
| 13 | +| `icon` | `String`/`Element` | | Value of the icon | |
| 14 | +| `iconAlignment` | `String` | `left` | Set an alignment of the icon. Possible values are 'left', 'right' | |
| 15 | + |
| 16 | +### Theme |
| 17 | + |
| 18 | +| Name | Description| |
| 19 | +|:---------|:-----------| |
| 20 | +| `button` | Class used for the root element.| |
| 21 | +| `primary` | Class used for styling `primary` type buttons | |
| 22 | +| `secondary` | Class used for styling `secondary` type buttons | |
| 23 | +| `success` | Class used for styling `success` type buttons | |
| 24 | +| `danger` | Class used for styling `danger` type buttons | |
| 25 | +| `warning` | Class used for styling `warning` type buttons | |
| 26 | +| `info` | Class used for styling `info` type buttons | |
| 27 | +| `light` | Class used for styling `light` type buttons | |
| 28 | +| `dark` | Class used for styling `dark` type buttons | |
| 29 | +| `small` | Class used for styling `small` sized buttons | |
| 30 | +| `medium` | Class used for styling `medium` sized buttons | |
| 31 | +| `large` | Class used for styling `large` sized buttons | |
| 32 | + |
| 33 | +### Usage |
| 34 | +``` |
| 35 | + <div> |
| 36 | + <div> |
| 37 | + <h4>Buttons with diffent styles</h4> |
| 38 | + <Button>Default</Button> |
| 39 | + <Button type="primary">Primary</Button> |
| 40 | + <Button type="secondary">Secondary</Button> |
| 41 | + <Button type="success">Success</Button> |
| 42 | + <Button type="danger">Danger</Button> |
| 43 | + <Button type="warning">Warning</Button> |
| 44 | + <Button type="info">Info</Button> |
| 45 | + <Button type="light">Light</Button> |
| 46 | + <Button type="dark">Dark</Button> |
| 47 | + </div> |
| 48 | +
|
| 49 | + <div> |
| 50 | + <h4>Buttons with diffent sizes</h4> |
| 51 | + <Button type="primary" size="small">Small</Button> |
| 52 | + <Button type="primary" size="medium">Medium</Button> |
| 53 | + <Button type="primary" size="large">Large</Button> |
| 54 | + </div> |
| 55 | +
|
| 56 | + <div> |
| 57 | + <h4>Buttons with Icon</h4> |
| 58 | + <Button type="success" icon="done">Left Icon</Button> |
| 59 | + <Button type="success" icon="done" iconAlignment="right">Right Icon</Button> |
| 60 | + </div> |
| 61 | + </div> |
| 62 | +``` |
0 commit comments