Last Updated on : 2024-06-05 03:14:29download
BrickButton
is an extension of Button
function.
Note: for more information, see BrickButton Demo.
import { BrickButton } from "tuya-panel-kit";
<BrickButton text="loading" loading={true} />;
Container style.
Type | Required | Default value |
---|---|---|
ViewPropTypes.style |
No | null |
Click event.
Type | Required | Default value |
---|---|---|
()=> void |
No | () => {} |
Event listener collection.
onShowUnderlay
: call it when the underlying color is shown.onHideUnderlay
: call it when the underlying color is hidden.Type | Required | Default value |
---|---|---|
(eventName, ...args) => void |
No | () => {} |
Show the reading status or not.
Type | Required | Default value |
---|---|---|
boolean |
No | false |
Button text.
Type | Required | Default value |
---|---|---|
PropTypes.string |
No | PropTypes.array |
Button text style.
Type | Required | Default value |
---|---|---|
Text.propTypes.style |
No | null |
Button type.
primary
: rectangular.primaryGradient
: rectangular with gradient.primaryBorder
: rectangular with border radius.normal
: normal sized button.small
: small sized button.Type | Required | Default value |
---|---|---|
oneOfType |
No | primary |
Content style inside the button.
Type | Required | Default value |
---|---|---|
ViewPropTypes.style |
No | null |
The color of the button when it is being clicked.
Type | Required | Default value |
---|---|---|
ColorPropType |
No | null |
Determine whether to show the color of the button when it is being clicked.
Type | Required | Default value |
---|---|---|
ColorPropType |
No | true |
Main color of loading
component.
Type | Required | Default value |
---|---|---|
ColorPropType |
No | #fff |
Background color of loading
.
Type | Required | Default value |
---|---|---|
number |
No | rgba(0, 0, 0, 0.1) |
Size of loading
.
Type | Required | Default value |
---|---|---|
'small' | 'large' | number |
No | ‘small’ |
Border width of loading
.
Type | Required | Default value |
---|---|---|
number |
No | 2 |
Gradient background.
Type | Required | Default value |
---|---|---|
object |
No | { x1: '0%', y1: '0%', x2: '0%', y2: '100%', stops: { '0%': 'red', '30%': 'blue', '100%': 'yellow', }, } |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback