mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Update imports of NamedColorsPalette
This commit is contained in:
parent
549e0993c4
commit
d414e463bd
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import NamedColorsPicker from './NamedColorsPalette';
|
||||
import { NamedColorsPalette } from './NamedColorsPalette';
|
||||
import { getColorName, getColorFromHexRgbOrName } from '../../utils/namedColorsPalette';
|
||||
import { ColorPickerProps, handleColorPickerPropsDeprecation } from './ColorPicker';
|
||||
import { GrafanaTheme, Themeable } from '../../types';
|
||||
@ -38,9 +38,9 @@ export class ColorPickerPopover extends React.Component<Props, State> {
|
||||
const { color, theme } = this.props;
|
||||
|
||||
return activePicker === 'spectrum' ? (
|
||||
<SpectrumPalette color={color} onChange={this.handleChange} theme={theme} />
|
||||
<SpectrumPalette color={color} onChange={this.handleChange} theme={theme} />
|
||||
) : (
|
||||
<NamedColorsPicker color={getColorName(color, theme)} onChange={this.handleChange} theme={theme} />
|
||||
<NamedColorsPalette color={getColorName(color, theme)} onChange={this.handleChange} theme={theme} />
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,7 @@ interface NamedColorsPaletteProps extends Themeable {
|
||||
onChange: (colorName: string) => void;
|
||||
}
|
||||
|
||||
const NamedColorsPalette = ({ color, onChange, theme }: NamedColorsPaletteProps) => {
|
||||
export const NamedColorsPalette = ({ color, onChange, theme }: NamedColorsPaletteProps) => {
|
||||
const swatches: JSX.Element[] = [];
|
||||
ColorsPalette.forEach((colors, hue) => {
|
||||
swatches.push(
|
||||
@ -38,4 +38,3 @@ const NamedColorsPalette = ({ color, onChange, theme }: NamedColorsPaletteProps)
|
||||
);
|
||||
};
|
||||
|
||||
export default NamedColorsPalette;
|
||||
|
@ -189,14 +189,17 @@ $arrowSize: 15px;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner
|
||||
{
|
||||
display:block;
|
||||
position:absolute;
|
||||
top:0;left:0;bottom:0;right:0;
|
||||
.sp-preview-inner,
|
||||
.sp-alpha-inner,
|
||||
.sp-thumb-inner {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
|
||||
.gf-color-picker__body {
|
||||
padding-bottom: $arrowSize;
|
||||
padding-left: 6px;
|
||||
|
Loading…
Reference in New Issue
Block a user