@lx-react-materiel/mp-button
0.6.5 • Public • Published mp-button
该组件只能在 ** Taro3 ** 中使用
代码示例
import MpButton from '@lx-react-materiel/mp-button';
const Demo = () => (
<MpButton
type="primary"
size="large"
danger
>按钮示例</MpButton>
);
API
Props
参数 |
说明 |
类型 |
默认值 |
必填 |
type |
按钮类型 |
'default' | 'primary' | 'text' | 'normal' |
'default' |
否 |
size |
按钮大小 |
'large' | 'middle' | 'small' |
'middle' |
否 |
shape |
按钮形状 |
'default' | 'round' |
'default' |
否 |
danger |
设置危险按钮 |
boolean |
false |
否 |
disabled |
按钮禁用状态 |
boolean |
false |
否 |
block |
将按钮宽度调整为其父宽度 |
boolean |
false |
否 |
bgColor |
背景颜色 |
string |
'' |
否 |
color |
文本颜色 |
string |
'' |
否 |
borderColor |
边框颜色 |
string |
'' |
否 |
children |
按钮内容 |
React.ReactNode |
-- |
是 |
Events
事件 |
说明 |
回调参数 |
onClick |
点击按钮回调 |
-- |
Package Sidebar
Install
npm i @lx-react-materiel/mp-button
Weekly Downloads