Skip to content

Change arrow down and arrow up color. #632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
NikitaNS opened this issue Jan 17, 2023 · 9 comments
Open

Change arrow down and arrow up color. #632

NikitaNS opened this issue Jan 17, 2023 · 9 comments

Comments

@NikitaNS
Copy link

NikitaNS commented Jan 17, 2023

I want to change the color for the arrow down or up icon.
How can I change the icon color, what is the difference between arrowIconStyle and arrowIconContainerStyle?

@alelaru
Copy link

alelaru commented Feb 23, 2023

Hey the best approach here is to create your own arrows and render them with ArrowUpIconComponent and ArrowDownIconComponent

https://hossein-zare.github.io/react-native-dropdown-picker-website/docs/advanced/icons

It will be nice to change the color but at the moment its not possible, or go directly into the code and patch it hard-coded

@loloide
Copy link

loloide commented Jun 8, 2023

i believe arrowIconStyle is the arrow and arrowIconContainerStyle is the thing that contains it, but it is not visible since it has no borders or background color on default

@murat-mehmet
Copy link

Late but here's the solution:

arrowIconStyle={{tintColor: 'red'}}

@chunghn
Copy link

chunghn commented Sep 13, 2023

Late but here's the solution:

arrowIconStyle={{tintColor: 'red'}}

Nice! Would you mind to explain why tintColor works?

@murat-mehmet
Copy link

Late but here's the solution:

arrowIconStyle={{tintColor: 'red'}}

Nice! Would you mind to explain why tintColor works?

arrowIconStyle is used as Image style in Picker.js

tintColor field is used in Image component to colorize the whole image.

@YuliiaNovak
Copy link

YuliiaNovak commented Jan 10, 2024

Late but here's the solution:

arrowIconStyle={{tintColor: 'red'}}

@murat-mehmet how to solve the typing issue here?

Type '{ tintColor: string; }' is not assignable to type 'StyleProp<ViewStyle>'. 
Object literal may only specify known properties, and 'tintColor' does not exist in type 'ViewStyle | RecursiveArray<Falsy | ViewStyle | RegisteredStyle<ViewStyle>>'.
index.d.ts(169, 5): The expected type comes from property 'arrowIconStyle' which is declared here on type 'IntrinsicAttributes & PropsWithoutRef<DropDownPickerProps<string>>'

@murat-mehmet
Copy link

I would just cast to any or ignore it for now.

The type definition is incorrect in index.d.ts. I just opened PR #735 to fix it.

@Diogo107
Copy link

Diogo107 commented May 9, 2024

For me this did the trick.

iconStyle={{ tintColor: '#57D497' }}

@hassamarifdev
Copy link

hassamarifdev commented Jul 15, 2024

Late but here's the solution:

arrowIconStyle={{tintColor: 'red'}}

Nice! Would you mind to explain why tintColor works?

arrowIconStyle is used as Image style in Picker.js

tintColor field is used in Image component to colorize the whole image.

this works for me. someone should close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants