-
Couldn't load subscription status.
- Fork 11
Closed
Description
Hello, may I know how to styling for different states? For example if I use a custom component as caret icon, how to set something like rotate(180deg) for it when menu is opened?
Below is what react select do (state.isSelected / state.isDisabled):
const customStyles = {
option: (provided, state) => ({
...provided,
borderBottom: '1px dotted pink',
color: state.isSelected ? 'red' : 'blue',
padding: 20,
}),
control: () => ({
// none of react-select's styles are passed to <Control />
width: 200,
}),
singleValue: (provided, state) => {
const opacity = state.isDisabled ? 0.5 : 1;
const transition = 'opacity 300ms';
return { ...provided, opacity, transition };
}
}
based-ghost
Metadata
Metadata
Assignees
Labels
No labels