diff options
author | 2021-12-04 10:51:16 +0100 | |
---|---|---|
committer | 2021-12-04 10:51:16 +0100 | |
commit | 11c992b04f3cad6badf0ae86da65f490e31dd359 (patch) | |
tree | 749e63f6ba3e9bea48c186b5d8502d328edfd276 /src/components/ui/button/index.tsx | |
parent | 5.6.4-nightly.24 [skip ci] (diff) | |
download | ferdium-app-11c992b04f3cad6badf0ae86da65f490e31dd359.tar.gz ferdium-app-11c992b04f3cad6badf0ae86da65f490e31dd359.tar.zst ferdium-app-11c992b04f3cad6badf0ae86da65f490e31dd359.zip |
chore: upgrade react-jss to latest (#2302)
Diffstat (limited to 'src/components/ui/button/index.tsx')
-rw-r--r-- | src/components/ui/button/index.tsx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/components/ui/button/index.tsx b/src/components/ui/button/index.tsx index 12e5e4449..d91b1ee19 100644 --- a/src/components/ui/button/index.tsx +++ b/src/components/ui/button/index.tsx | |||
@@ -2,11 +2,11 @@ import Icon from '@mdi/react'; | |||
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { Property } from 'csstype'; | 3 | import { Property } from 'csstype'; |
4 | import { Component, MouseEvent } from 'react'; | 4 | import { Component, MouseEvent } from 'react'; |
5 | import injectStyle, { withTheme } from 'react-jss'; | 5 | import injectStyle, { WithStylesProps } from 'react-jss'; |
6 | import Loader from 'react-loader'; | 6 | import Loader from 'react-loader'; |
7 | 7 | ||
8 | import { Theme } from '../../../themes'; | 8 | import { Theme } from '../../../themes'; |
9 | import { IFormField, IWithStyle } from '../typings/generic'; | 9 | import { IFormField } from '../typings/generic'; |
10 | 10 | ||
11 | type ButtonType = | 11 | type ButtonType = |
12 | | 'primary' | 12 | | 'primary' |
@@ -16,7 +16,7 @@ type ButtonType = | |||
16 | | 'warning' | 16 | | 'warning' |
17 | | 'inverted'; | 17 | | 'inverted'; |
18 | 18 | ||
19 | interface IProps extends IFormField, IWithStyle { | 19 | interface IProps extends IFormField, WithStylesProps<typeof styles> { |
20 | className?: string; | 20 | className?: string; |
21 | disabled?: boolean; | 21 | disabled?: boolean; |
22 | id?: string; | 22 | id?: string; |
@@ -179,7 +179,7 @@ class ButtonComponent extends Component<IProps> { | |||
179 | const { | 179 | const { |
180 | classes, | 180 | classes, |
181 | className, | 181 | className, |
182 | theme, | 182 | // theme, |
183 | disabled, | 183 | disabled, |
184 | id, | 184 | id, |
185 | label, | 185 | label, |
@@ -213,7 +213,7 @@ class ButtonComponent extends Component<IProps> { | |||
213 | loaded={false} | 213 | loaded={false} |
214 | width={4} | 214 | width={4} |
215 | scale={0.45} | 215 | scale={0.45} |
216 | color={theme.buttonLoaderColor[buttonType!]} | 216 | // color={theme.buttonLoaderColor[buttonType!]} |
217 | parentClassName={classes.loader} | 217 | parentClassName={classes.loader} |
218 | /> | 218 | /> |
219 | )} | 219 | )} |
@@ -262,4 +262,6 @@ class ButtonComponent extends Component<IProps> { | |||
262 | } | 262 | } |
263 | } | 263 | } |
264 | 264 | ||
265 | export const Button = injectStyle(styles)(withTheme(ButtonComponent)); | 265 | export const Button = injectStyle(styles, { injectTheme: true })( |
266 | ButtonComponent, | ||
267 | ); | ||