rcd-button
v1.1.806
Published
A react button component for SJ. Buttons to be used with forms. Button types include primary, secondary, icon, and text + icon.
Downloads
12
Readme
SJ-RCD Button - React Component for SJ
A react button component for SJ. Buttons to be used with forms. Button types include primary, secondary, icon, and text + icon.
Installation Guide
npm install react-button
Usage Guide
Button Import
import Button from 'react-button';
Button Reference
<Button
accent=""
className=""
context=""
fullWidth={false}
icon=""
isGroup={false}
label=""
popout=""
onClick={function noRefCheck() {}}
/>
Button types
Primary Button Requirement: context
label
Secondary Button Requirement: context
label
Text + Icon Button Requirement: icon
label
Icon Button Requirement: icon
popout
Props
The following props may be passed to configure the <Button>
element:
| name | type | description | default |
| --------- | --------- | ---------------------------------------------------------------------------------------------------------- | ------------- |
| accent | String
| Indicate the accent of the button. Example: accent-1
,accent-2
,accent-3
,accent-4
| |
| className | String
| Additional class to be added to the element | |
| context | String
| Indicate the context of the button. Example btn-primary
, btn-secondary
. | |
| disabled | Boolean
| Indicate if the button is disabled. | |
| fullWidth | Boolean
| Indicate if this button is full width | |
| icon | String
| Indicate the icon of the button. Example icon-save
, icon-delete
, etc | |
| isGroup | Boolean
| Indicate if this button is part of a button group. | |
| label | String
| Button text to be displayed in the component. | |
| popout | String
| Popout text to be displayed in Icon Only display of the component. | |