srivastavaanurag79 / react-native-paper-select

Dropdown using React Native Paper TextInput, Checkbox and Dialog
https://anurag-srivastava.gitbook.io/react-native-paper-select/
MIT License
48 stars 15 forks source link

Cannot apply textInputStyle color #47

Closed SosophieParis closed 5 months ago

SosophieParis commented 7 months ago

Hi, Firstly, many thank's for your great work !! 👍 Is there any way to change the textInputStyle color ? when I use textInputStyle={{ color: '#222222', fontWeight: '800' }}, fontWeight is modified but not color. Any Idea ? I tried this way : <Controller name="masque" control={control} render={({ field: { onChange, value } }) => ( <PaperSelect label="Masques" value={value} textInputMode="outlined" textInputStyle={{ color: '#222222', fontWeight: '800' }} onSelection={(value: any) => { setMasqueList({ ...masqueList, value: value.text, selectedList: value.selectedList, error: '', }); onChange(value.text); }} arrayList={[...masqueList.list]} selectedArrayList={masqueList.selectedList} errorText={masqueList.error} multiEnable={false} hideSearchBox={true} dialogTitleStyle={{ color: '#4BAFBF' }} textInputProps={{ underlineColor: '#e74c3c', outlineColor: '#cecece', activeOutlineColor: '#4BAFBF', }} checkboxProps={{ checkboxColor: '#4BAFBF', checkboxUncheckedColor: '#e74c3c', }} searchbarProps={{ iconColor: 'brown', }} searchText="Rechercher" dialogCloseButtonText="Annuler" dialogDoneButtonText="Valider" dialogCloseButtonStyle={{ color: '#e74c3c' }} dialogDoneButtonStyle={{ color: 'white', backgroundColor: '#1abc9c', padding: 9, borderRadius: 5, overflow: 'hidden' }} theme={{ colors: { onSurfaceVariant: '#cecece', }, }} /> )} />

srivastavaanurag79 commented 5 months ago

you will have to use below, if you are using react native paper version <5:

theme={{
            colors: {
              text: 'blue', // Change this to the desired text color
              placeholder: 'gray', // Change this to the desired placeholder color
            },
          }}

for react native paper v5 there is a new prop textColor I will be adding it in the next release.