Scenes: Adjust styles to allow shrinking of variable selectors (#87085)

This commit is contained in:
kay delaney 2024-05-02 16:23:29 +01:00 committed by GitHub
parent b7df129b78
commit bc9010a95b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -33,11 +33,10 @@ class UnthemedValueContainer extends Component<any & { theme: GrafanaTheme2 }> {
const noWrap = this.props.selectProps?.noMultiValueWrap && !this.props.selectProps?.menuIsOpen;
const styles = getSelectStyles(theme);
const dataTestid = selectProps['data-testid'];
const className = cx(
styles.valueContainer,
isMulti && styles.valueContainerMulti,
noWrap && styles.valueContainerMultiNoWrap
);
const className = cx(styles.valueContainer, {
[styles.valueContainerMulti]: isMulti && !noWrap,
[styles.valueContainerMultiNoWrap]: isMulti && noWrap,
});
return (
<div data-testid={dataTestid} className={className}>

View File

@ -97,7 +97,8 @@ export const getSelectStyles = stylesFactory((theme: GrafanaTheme2) => {
display: 'flex',
}),
valueContainerMultiNoWrap: css({
flexWrap: 'nowrap',
display: 'grid',
gridAutoFlow: 'column',
}),
loadingMessage: css({
label: 'grafana-select-loading-message',