aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/ColorPickerInput.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ui/ColorPickerInput.tsx')
-rw-r--r--src/components/ui/ColorPickerInput.tsx15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/components/ui/ColorPickerInput.tsx b/src/components/ui/ColorPickerInput.tsx
index 8a4d3129a..710d05586 100644
--- a/src/components/ui/ColorPickerInput.tsx
+++ b/src/components/ui/ColorPickerInput.tsx
@@ -8,7 +8,7 @@ interface IProps {
8 field: Field; 8 field: Field;
9 className?: string; 9 className?: string;
10 focus?: boolean; 10 focus?: boolean;
11}; 11}
12 12
13class ColorPickerInput extends Component<IProps> { 13class ColorPickerInput extends Component<IProps> {
14 static defaultProps = { 14 static defaultProps = {
@@ -34,16 +34,13 @@ class ColorPickerInput extends Component<IProps> {
34 this.inputElement?.focus(); 34 this.inputElement?.focus();
35 } 35 }
36 36
37 handleChangeComplete = (color: { hex: string; }) => { 37 handleChangeComplete = (color: { hex: string }) => {
38 const { field } = this.props; 38 const { field } = this.props;
39 field.value = color.hex 39 field.value = color.hex;
40 }; 40 };
41 41
42 render() { 42 render() {
43 const { 43 const { field, className } = this.props;
44 field,
45 className,
46 } = this.props;
47 44
48 let { type } = field; 45 let { type } = field;
49 type = 'text'; 46 type = 'text';
@@ -57,8 +54,8 @@ class ColorPickerInput extends Component<IProps> {
57 })} 54 })}
58 > 55 >
59 <SliderPicker 56 <SliderPicker
60 color={ field.value } 57 color={field.value}
61 onChangeComplete={ this.handleChangeComplete } 58 onChangeComplete={this.handleChangeComplete}
62 id={field.id} 59 id={field.id}
63 type={type} 60 type={type}
64 className="franz-form__input" 61 className="franz-form__input"