mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
grafana-ui: Style disabled option for Select (#41464)
This commit is contained in:
parent
f6545ab8f4
commit
8d22733666
@ -47,7 +47,12 @@ export const SelectMenuOptions = React.forwardRef<HTMLDivElement, React.PropsWit
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={cx(styles.option, isFocused && styles.optionFocused, isSelected && styles.optionSelected)}
|
||||
className={cx(
|
||||
styles.option,
|
||||
isFocused && styles.optionFocused,
|
||||
isSelected && styles.optionSelected,
|
||||
data.isDisabled && styles.optionDisabled
|
||||
)}
|
||||
{...innerProps}
|
||||
aria-label="Select option"
|
||||
>
|
||||
|
@ -57,6 +57,12 @@ export const getSelectStyles = stylesFactory((theme: GrafanaTheme2) => {
|
||||
optionSelected: css`
|
||||
background: ${theme.colors.action.selected};
|
||||
`,
|
||||
optionDisabled: css`
|
||||
label: grafana-select-option-disabled;
|
||||
background-color: ${theme.colors.action.disabledBackground};
|
||||
color: ${theme.colors.action.disabledText};
|
||||
cursor: not-allowed;
|
||||
`,
|
||||
singleValue: css`
|
||||
label: grafana-select-single-value;
|
||||
color: ${theme.components.input.text};
|
||||
|
Loading…
Reference in New Issue
Block a user