Replies: 1 comment
-
Hello @karlkras, what you are doing with your "Control width" example is effectively replacing the whole style for the If you want to enhance the base styles for the E.g. fixed width: const customStyles = {
container: (provided) => ({
...provided,
width: 400
})
} Your other queries should be performed in the same way, targeting different elements of the {
// custom border color based on state
// `selectProps` contains all the props set on the `Select` component
control: (provided, { isFocused, selectProps, theme }) => ({
...provided,
...(selectProps.hasError && {
borderColor: theme.colors.danger,
boxShadow: isFocused && `0 0 0 1px ${theme.colors.danger}`, // `boxShadow` is used to signal focus
'&:hover': {
borderColor: theme.colors.danger
}
})
}),
// Changing `zIndex`
menu /* or `menutPortal` */: (provided) => ({
...provided, zIndex: 100
})
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Good afternoon.
New to using
react-select
and am very impressed (so far) with the functionality of it. However I'm trying to figure out how to perform some relatively simple styling processes. Pretty sure once pushed in the correct direction it will click... for example:which sorta worked but screwed up the formatting of the option list.
any help on how to approach these things would be greatly appreciated.
I've looked through the docs but it's not clear how to best approach this.
Beta Was this translation helpful? Give feedback.
All reactions