Style option in dropdown? #182
-
How can I change the style of background? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I can't tell exactly what you're trying to do, but what you're probably looking for is the return (
<Select
chakraStyles={{
option: (provided) => ({
...provided,
_first: {
pt: 0
},
_last: {
pb: 0
}
})
}}
/>
) Here's a demo of the prop in action, obviously without the custom components: https://codesandbox.io/s/chakra-react-select-option-styles-6g16yc?file=/example.js If you need further help, please make a CodeSandbox reproduction of what you have so far and I can give a better example based on that: https://codesandbox.io/s/chakra-react-select-vsvr0?file=/example.js |
Beta Was this translation helpful? Give feedback.
I can't tell exactly what you're trying to do, but what you're probably looking for is the
chakraStyles
prop. Something along these lines should do the trick, but I'm not sure how you have your custom components set up.Here's a demo of the prop in action, obviously without the custom components: https://codesandbox.io/s/chakra-react-select-option-styles-6g16yc?file=/example.js
If you need further help, please make a CodeSandbox reproduction of what you have so far and I can give a better e…