mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Scenes: Adjust styles to allow shrinking of variable selectors (#87085)
This commit is contained in:
parent
b7df129b78
commit
bc9010a95b
@ -33,11 +33,10 @@ class UnthemedValueContainer extends Component<any & { theme: GrafanaTheme2 }> {
|
|||||||
const noWrap = this.props.selectProps?.noMultiValueWrap && !this.props.selectProps?.menuIsOpen;
|
const noWrap = this.props.selectProps?.noMultiValueWrap && !this.props.selectProps?.menuIsOpen;
|
||||||
const styles = getSelectStyles(theme);
|
const styles = getSelectStyles(theme);
|
||||||
const dataTestid = selectProps['data-testid'];
|
const dataTestid = selectProps['data-testid'];
|
||||||
const className = cx(
|
const className = cx(styles.valueContainer, {
|
||||||
styles.valueContainer,
|
[styles.valueContainerMulti]: isMulti && !noWrap,
|
||||||
isMulti && styles.valueContainerMulti,
|
[styles.valueContainerMultiNoWrap]: isMulti && noWrap,
|
||||||
noWrap && styles.valueContainerMultiNoWrap
|
});
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div data-testid={dataTestid} className={className}>
|
<div data-testid={dataTestid} className={className}>
|
||||||
|
@ -97,7 +97,8 @@ export const getSelectStyles = stylesFactory((theme: GrafanaTheme2) => {
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
}),
|
}),
|
||||||
valueContainerMultiNoWrap: css({
|
valueContainerMultiNoWrap: css({
|
||||||
flexWrap: 'nowrap',
|
display: 'grid',
|
||||||
|
gridAutoFlow: 'column',
|
||||||
}),
|
}),
|
||||||
loadingMessage: css({
|
loadingMessage: css({
|
||||||
label: 'grafana-select-loading-message',
|
label: 'grafana-select-loading-message',
|
||||||
|
Loading…
Reference in New Issue
Block a user