Closed oscadev closed 3 years ago
I had the same problem. But it is apparently not possible to change the style of the inputs.
I ended up editing the js file in the node directory and changing the styles I needed updated.
Pushed changes up to allow overriding of styles, hoping the maintainer merges but if not I will create a new npm package
Pushed changes up to allow overriding of styles, hoping the maintainer merges but if not I will create a new npm package
Did you create an NPM package?
@oscadev @sandersonsoares @paulbryan @tonyduanesmith @Jaseyacey
Sorry for the delayed response! It's been a busy year and I just haven't had the time to maintain some of my libraries. However, I've taken the past week and revamped the library completely with custom styles, React 17, iOS 14 support, improved darkMode
, updated dependencies, improved package.json
, improved file organization and file names, and Typescript Improvements.
You can add custom styles for any of the pickers and dropdowns. Here is an example:
<PickerTime
title="Time (Custom Styles)"
onChange={(date: Date) => setTime(date)}
mode="spinner"
customStyleContainer={{
containerLight: {
backgroundColor: '#000000',
borderColor: '#000000',
borderBottomWidth: 2,
},
containerDark: {
backgroundColor: '#000000',
borderColor: '#000000',
borderBottomWidth: 2,
},
}}
customStyleLabelText={{
labelTextLight: {
fontFamily: 'System',
fontSize: 22,
fontWeight: '800',
textTransform: 'lowercase',
color: 'red',
},
labelTextDark: {
fontFamily: 'System',
fontSize: 22,
fontWeight: '800',
textTransform: 'lowercase',
color: 'red',
},
}}
/>
I dont need the width taking up the entire screen, and doing something like "width:200" either on the parent container, or as a style, or as a containerStyle, is completely ignored.