react-native-menu-action-cus
1.0.1 • Public • Published 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) - 背景色.
Package Sidebar
Install
npm i react-native-menu-action-cus
Weekly Downloads