nessus-ui
v1.1.9
Published
A React component UI library
Downloads
48
Maintainers
Readme
🪐 Nessus UI
A React UI library with easy and ready to use components!
Button
A component for triggering a user action. e.g: a submit button in a form
Import
import { Button } from 'nessus-ui';Usage
<Button
buttonType="contained"
text="Send"
loading={loading}
loadingAnimation={loadingAnimation}
onClick={() => 'Do something'}
/>Required props
| Name | Type | Description |
| ------ | -------- | --------------------------------- |
| text | string | Text that will show inside button |
Optional props
| Name | Type | Description |
| ------------------ | ---------- | ------------------------------------------------------------------------------------- |
| onClick | function | |
| buttonType | string | A type that determines the style of the button. ('contained', 'outlined', 'disabled') |
| type | string | Determines the type of button input. ('button', 'submit','reset') |
| buttonWidth | string | Determines a specific width to the button. |
| disabled | boolean | Determines whether the button is disabled or not. |
| testID | string | Specify the data-testid of the button. |
| loading | boolean | Specify whether to show the loading or not. |
| loadingAnimation | any | The element to show when 'loading' is true. |
