Constructor
# <Button />
Button Component
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
text |
string
|
The text to display on the button. | ||
onClick |
MouseEventHandler.<HTMLButtonElement>
|
The handler function gets called when the user clicks on the button. Cannot be used if href is defined. | ||
href |
string
|
Link that the button will redirect to when clicked. Cannot be used if onClick is defined. | ||
icon |
ReactElement
|
<optional> |
The icon to display on the button. | |
type |
"success"
|
"info"
|
"warning"
|
"error"
|
<optional> |
The type (in terms of style) of button. | |
outlined |
boolean
|
<optional> |
false | Whether the button is outlined or filled in. Filled in by default. |
disabled |
boolean
|
<optional> |
false | Whether to disable the button. |
loading |
boolean
|
<optional> |
false | Whether to show a loading state for the button. |