1.0.0-beta • Published 7 years ago
react-native-select-group-buttons-modal v1.0.0-beta
react-native-select-group-buttons-modal
It's still under development.Please do not try case installation
Getting started
$ npm install react-native-select-group-buttons-modal --save
Mostly automatic installation
$ react-native link react-native-select-group-buttons-modal
Usage
import RNSelectGroupButtonsModal from 'react-native-select-group-buttons-modal';
<RNSelectGroupButtonsModal
settingBuild={this._settingBuild}
onPaymentModeChanged={(item, index) => {
this.setState({
selectText: JSON.stringify(item)
})
}}
data={this.initData()}
closeButtonPress={(flag) => {
this.setState({
selectorVisible: flag
})
}}
selectorVisible={this.state.selectorVisible}/>Run Sample
npm install expo-cli --global //If you haven't installed it before
git clone git@github.com:ddwhan0123/react-native-select-group-buttons-modal.git //clone git
cd sample
npm install
expo start -c --localhost --iosAndroid Demonstration Effect iOS Demonstration Effect
Properties
settingBuild?:objectObjects that set underlying properties
_settingBuild = {
backdropColor: '#303437',
backdropOpacity: 0.2,
animationIn: 'slideInUp',
animationTime: 400,//Default animation duration
hideOnBack: true,
modalTitle: '支付方式',//Main title
modalTips: '业务控制文字内容',Subheading
closeWithOutSideClick: true,//Click on the grey area to close the bullet window
submitText: '确定'//Bottom Button submit text
};onPaymentModeChanged?:(item, index) => voidCallback of selected content
data?:object[]Button Data Source Object Array
closeButtonPress?:(flag) => voidClose button callback
selectorVisible?:booleanWhether to display the bullet window label
defaultMode?:objectObjects selected by default
styleSetting Style Properties
SubmitButtonStyleSetting the properties of the bottom button style
tipsColorSetting Subtitle Style
hideCloseButton?:booleanSet whether to display the close button
defaultCloseIcon?:objectResource object of close button file
closeWithOutSideClick?:booleanClick on the outside area to close the bullet window
Licenses
- MIT
1.0.0-beta
7 years ago
0.0.4-beta
7 years ago
0.0.3-beta
7 years ago
0.0.2-beta
7 years ago
0.0.1-beta
7 years ago