UNPKG

react-native-paper-select

Version:

Material Design Select Dropdown Component using React Native Paper

43 lines (41 loc) 1.12 kB
/* eslint-disable react-native/no-inline-styles */ import React, { memo } from 'react'; import { View, StyleSheet } from 'react-native'; import { Checkbox } from 'react-native-paper'; const CheckboxInput = ({ isChecked, label, checkboxColor, checkboxLabelStyle, checkboxLabelVariant, checkboxUncheckedColor, checkboxMode, disabled, onPress, testID }) => /*#__PURE__*/React.createElement(View, { style: styles.container }, /*#__PURE__*/React.createElement(Checkbox.Item, { uncheckedColor: checkboxUncheckedColor, color: checkboxColor, status: disabled ? 'indeterminate' : isChecked === true ? 'checked' : 'unchecked', label: label.trim(), labelStyle: { ...checkboxLabelStyle, textAlign: 'left' }, labelVariant: checkboxLabelVariant, mode: checkboxMode, position: `leading`, disabled: disabled, onPress: disabled ? () => {} : onPress, testID: testID })); const styles = StyleSheet.create({ container: { flexDirection: 'column', flex: 1, justifyContent: 'center' } }); export default /*#__PURE__*/memo(CheckboxInput); //# sourceMappingURL=checkBox.js.map