diff --git a/packages/grafana-ui/src/components/Segment/Segment.tsx b/packages/grafana-ui/src/components/Segment/Segment.tsx index 750fdf47e7b..53cdfb834cf 100644 --- a/packages/grafana-ui/src/components/Segment/Segment.tsx +++ b/packages/grafana-ui/src/components/Segment/Segment.tsx @@ -3,6 +3,9 @@ import { cx } from 'emotion'; import _ from 'lodash'; import { SelectableValue } from '@grafana/data'; import { SegmentSelect, useExpandableLabel, SegmentProps } from './'; +import { getSegmentStyles } from './styles'; +import { InlineLabel } from '../Forms/InlineLabel'; +import { useStyles } from '../../themes'; export interface SegmentSyncProps extends SegmentProps, Omit, 'value' | 'onChange'> { value?: T | SelectableValue; @@ -18,19 +21,32 @@ export function Segment({ className, allowCustomValue, placeholder, + disabled, ...rest }: React.PropsWithChildren>) { const [Label, width, expanded, setExpanded] = useExpandableLabel(false); + const styles = useStyles(getSegmentStyles); if (!expanded) { const label = _.isObject(value) ? value.label : value; + return (