1.0.6 • Published 4 years ago
react-native-unit-zym v1.0.6
react naive 库
references
- https://material.io/components/buttons/
- https://github.com/Monte9/react-native-ratings
- https://mobile.ant.design/docs/react/introduce-cn
- https://react-native-training.github.io/react-native-elements/docs/labels.html
搭建组件库用 typescript 进行编写
- 搭建 react-native + typescript
- 安装 storybook 进行调试
使用
安装 npm i react-native-ks-ec 或者 yarn add react-native-ks-ec
Button
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
text | 按钮文字(必填) | string | "" |
onPress | 点击按钮的回调函数 (必填) | (e:object): void | 无 |
type | 按钮类型:可选值为container 、outline 、text | string | container |
size | 按钮大小:large 、middle 、small | string | large |
viewStyles | 自定义按钮样式 | object | 无 |
textStyles | 自定义按钮文字样式 | object | 无 |
theme | 样式类型:primary 、link 、 success | string | primary |
disabledViewStyles | 按钮禁用的按钮样式 | object | 无 |
disabledTextStyles | 按钮禁用的按钮文字样式 | object | 无 |
disabled | 设置按钮是否禁用 | boolean | false |
iconLeft | 按钮文字左侧带的图标 | Image 图片 | 无 |
iconLeftStyle | 自定义的左侧图标样式 | object | 无 |
iconRight | 按钮文字右侧带的图标 | Image 图片 | 无 |
iconRightStyle | 自定义右侧图标样式 | object | 无 |