@quidone/react-native-wheel-picker
Version:
Picker is a UI component for selecting an item from a list of options.
24 lines • 618 B
JavaScript
import React, { memo } from 'react';
import { StyleSheet, Text } from 'react-native';
import { usePickerItemHeight } from '../contexts/PickerItemHeightContext';
const PickerItem = _ref => {
let {
value,
label,
itemTextStyle
} = _ref;
const height = usePickerItemHeight();
return /*#__PURE__*/React.createElement(Text, {
style: [styles.root, {
lineHeight: height
}, itemTextStyle]
}, label ?? value);
};
const styles = StyleSheet.create({
root: {
textAlign: 'center',
fontSize: 20
}
});
export default /*#__PURE__*/memo(PickerItem);
//# sourceMappingURL=PickerItem.js.map