按钮组件。
npm install beeshell
import { Button } from 'beeshell';
import Button from 'beeshell/components/Button';
import React from 'react';
import { Button } from 'beeshell';
class App extends React.Component {
render() {
return (
<View>
<Button type="primary" size="md" responsive={false}>首选项 primary</Button>
<Button type="primary" size="md" responsive={false}>
<View>
<Text>自定义</Text>
<Text>支持组件</Text>
</View>
</Button>
</View>
);
}
}
Name | Type | Required | Default | Description |
---|---|---|---|---|
type | String | true | null | 指明按钮的预定义样式,default primary success info warning danger disabled |
size | String | false | 'md' | 尺寸,lg md sm |
responsive | Boolean | false | false | 是否拉伸至父组件 100% 宽度 |
onPress | Function | false | null | 点击回调 |