aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui/button/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/ui/button/index.tsx')
-rw-r--r--src/components/ui/button/index.tsx14
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';
2import classnames from 'classnames'; 2import classnames from 'classnames';
3import { Property } from 'csstype'; 3import { Property } from 'csstype';
4import { Component, MouseEvent } from 'react'; 4import { Component, MouseEvent } from 'react';
5import injectStyle, { withTheme } from 'react-jss'; 5import injectStyle, { WithStylesProps } from 'react-jss';
6import Loader from 'react-loader'; 6import Loader from 'react-loader';
7 7
8import { Theme } from '../../../themes'; 8import { Theme } from '../../../themes';
9import { IFormField, IWithStyle } from '../typings/generic'; 9import { IFormField } from '../typings/generic';
10 10
11type ButtonType = 11type ButtonType =
12 | 'primary' 12 | 'primary'
@@ -16,7 +16,7 @@ type ButtonType =
16 | 'warning' 16 | 'warning'
17 | 'inverted'; 17 | 'inverted';
18 18
19interface IProps extends IFormField, IWithStyle { 19interface 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
265export const Button = injectStyle(styles)(withTheme(ButtonComponent)); 265export const Button = injectStyle(styles, { injectTheme: true })(
266 ButtonComponent,
267);