Button

按钮组件。

Install

1. npm install beeshell

Usage

引入方式

全部引入

1. import { Button } from 'beeshell';

单独引入

1. import Button from 'beeshell/components/Button';

Examples

image

Code

2. import React from 'react';
3. import { Button } from 'beeshell';

5. class App extends React.Component {
6. render() {
7. return (
8. <View>
9. <Button type="primary" size="md" responsive={false}>首选项 primary</Button>

11. <Button type="primary" size="md" responsive={false}>
12. <View>
13. <Text>自定义</Text>
14. <Text>支持组件</Text>
15. </View>
16. </Button>
17. </View>
18. );
19. }
20. }

Props

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 点击回调