1 | ## 底部弹层
|
2 |
|
3 | [Demo](https://github.com/rnxteam/rnx-ui/blob/master/Example/src/page/Sheet/index.js)
|
4 |
|
5 | ```js
|
6 | Sheet.propTypes = {
|
7 | // 自定义样式
|
8 | style: View.propTypes.style,
|
9 | // 显示开关
|
10 | visible: PropTypes.bool.isRequired,
|
11 | // 遮罩层样式
|
12 | overlayStyle: View.propTypes.style,
|
13 | // 关闭回调(动画结束时)
|
14 | onClose: PropTypes.func,
|
15 | // 遮罩点击事件
|
16 | onPressOverlay: PropTypes.func,
|
17 | // 子元素
|
18 | children: PropTypes.oneOfType([PropTypes.element, PropTypes.array]),
|
19 | // 动画时长
|
20 | duration: PropTypes.number,
|
21 | };
|
22 | Sheet.defaultProps = {
|
23 | style: null,
|
24 | visible: false,
|
25 | overlayStyle: null,
|
26 | onClose: NOOP,
|
27 | onPressOverlay: NOOP,
|
28 | children: null,
|
29 | duration: 200,
|
30 | };
|
31 | ``` |
\ | No newline at end of file |