Updated color palette (#857)
* Updated color palette * Revert colors * Open default color palette Co-authored-by: Ramil Minyukov (Akvelon INC) <v-rminyukov@microsoft.com> Co-authored-by: bongshin <bongshin@microsoft.com>
This commit is contained in:
Родитель
5cf16681d4
Коммит
b95a25697d
|
@ -91,6 +91,15 @@ export class ColorPicker extends React.Component<
|
|||
currentPicker: null,
|
||||
};
|
||||
}
|
||||
|
||||
//REMOVE TO OPEN COLOR PALETTE BY DEFAULT VALUE
|
||||
//OPEN DEFAULT COLOR PALETTE
|
||||
this.state = {
|
||||
currentPalette: predefinedPalettes.filter(
|
||||
(x) => x.name == "Palette/ColorBrewer"
|
||||
)[0],
|
||||
currentPicker: null,
|
||||
};
|
||||
}
|
||||
|
||||
public render() {
|
||||
|
@ -103,6 +112,14 @@ export class ColorPicker extends React.Component<
|
|||
<>
|
||||
<PickersSectionWrapper>
|
||||
<PickersSection>
|
||||
<PaletteList
|
||||
palettes={predefinedPalettes.filter((x) => x.type == "palette")}
|
||||
selected={this.state.currentPalette}
|
||||
onClick={(p) => {
|
||||
this.setState({ currentPalette: p, currentPicker: null });
|
||||
this.props.parent?.forceUpdate();
|
||||
}}
|
||||
/>
|
||||
<Label>Color Picker</Label>
|
||||
<ColorPickerButton
|
||||
state={this.state}
|
||||
|
@ -124,14 +141,6 @@ export class ColorPicker extends React.Component<
|
|||
}
|
||||
type={PickerType.HSV}
|
||||
/>
|
||||
<PaletteList
|
||||
palettes={predefinedPalettes.filter((x) => x.type == "palette")}
|
||||
selected={this.state.currentPalette}
|
||||
onClick={(p) => {
|
||||
this.setState({ currentPalette: p, currentPicker: null });
|
||||
this.props.parent?.forceUpdate();
|
||||
}}
|
||||
/>
|
||||
</PickersSection>
|
||||
<NullButton
|
||||
allowNull={this.props.allowNull}
|
||||
|
|
Загрузка…
Ссылка в новой задаче