diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2022-07-25 08:16:50 +0530 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2022-07-25 08:17:10 +0530 |
commit | cf282aa351cbc58691fb1b2fb4764830247cdbe8 (patch) | |
tree | 1a6ac4c9abd8b3de9d358016a5065da86cdd8510 /src/components/ui/ColorPickerInput.tsx | |
parent | 6.0.1-nightly.3 [skip ci] (diff) | |
download | ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.tar.gz ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.tar.zst ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.zip |
eslint needs to be executed at the top-level to actually workv6.0.1-nightly.3
Diffstat (limited to 'src/components/ui/ColorPickerInput.tsx')
-rw-r--r-- | src/components/ui/ColorPickerInput.tsx | 15 |
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 | ||
13 | class ColorPickerInput extends Component<IProps> { | 13 | class 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" |