react-native-menu-action-cus
v1.0.1
Published
自定义弹出菜单(或页面)组件
Downloads
10
Maintainers
Readme
react-native-menu-action-cus
自定义弹出菜单(或页面)组件; 本组件是基于react-native-custom-action-sheet 进行修改和升级的
安装组件:
npm i --save react-native-lib-cus-com
示例
import CustomActionSheet from "react-native-menu-action-cus";
var SomeComponent = React.createClass({
render: function() {
return (
<View>
<CustomActionSheet modalVisible={this.state.modalVisible} onCancel={this.toggleModal}>
<View style={styles.datePickerContainer}>
<DatePickerIOS mode={"date"} date={@state.dateForPicker} onDateChange={@dateChanged} />
</View>
</CustomActionSheet>
</View>
);
}
});
公共属性
modalVisible
(Boolean) - 控制组件是否可见onCancel
(Function) - 取消回调函数buttonText
(String) - 按钮显示文本backgroundColor
(String) - 背景色.