|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
import { SelectableValue } from '@grafana/data'; |
|
|
|
|
import { TableCellBackgroundDisplayMode, TableColoredBackgroundCellOptions } from '@grafana/schema'; |
|
|
|
|
import { Field, RadioButtonGroup, Switch, Label, Badge } from '@grafana/ui'; |
|
|
|
|
// import { Field, RadioButtonGroup, Switch, Label, Badge } from '@grafana/ui';
|
|
|
|
|
import { Field, RadioButtonGroup, Switch } from '@grafana/ui'; |
|
|
|
|
|
|
|
|
|
import { TableCellEditorProps } from '../TableCellOptionEditor'; |
|
|
|
|
|
|
|
|
@ -25,19 +26,6 @@ export const ColorBackgroundCellOptionsEditor = ({ |
|
|
|
|
onChange(cellOptions); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Handle row coloring changes
|
|
|
|
|
const onWrapTextChange = () => { |
|
|
|
|
cellOptions.wrapText = !cellOptions.wrapText; |
|
|
|
|
onChange(cellOptions); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const label = ( |
|
|
|
|
<Label description="If selected text will be wrapped to the width of text in the configured column"> |
|
|
|
|
{'Wrap text '} |
|
|
|
|
<Badge text="Alpha" color="blue" style={{ fontSize: '11px', marginLeft: '5px', lineHeight: '1.2' }} /> |
|
|
|
|
</Label> |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<> |
|
|
|
|
<Field label="Background display mode"> |
|
|
|
@ -53,9 +41,6 @@ export const ColorBackgroundCellOptionsEditor = ({ |
|
|
|
|
> |
|
|
|
|
<Switch value={cellOptions.applyToRow} onChange={onColorRowChange} /> |
|
|
|
|
</Field> |
|
|
|
|
<Field label={label}> |
|
|
|
|
<Switch value={cellOptions.wrapText} onChange={onWrapTextChange} /> |
|
|
|
|
</Field> |
|
|
|
|
</> |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|