From 11c992b04f3cad6badf0ae86da65f490e31dd359 Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Sat, 4 Dec 2021 10:51:16 +0100 Subject: chore: upgrade react-jss to latest (#2302) --- src/components/ui/loader/index.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/components/ui/loader/index.tsx') diff --git a/src/components/ui/loader/index.tsx b/src/components/ui/loader/index.tsx index 0607bd48b..d56995ccc 100644 --- a/src/components/ui/loader/index.tsx +++ b/src/components/ui/loader/index.tsx @@ -1,25 +1,25 @@ import classnames from 'classnames'; import { Component } from 'react'; -import injectStyle, { withTheme } from 'react-jss'; +import injectStyle, { WithStylesProps } from 'react-jss'; import ReactLoader from 'react-loader'; -import { IWithStyle } from '../typings/generic'; - -interface IProps extends IWithStyle { +interface IProps extends WithStylesProps { className?: string; color?: string; } -const styles = () => ({ +const styles = theme => ({ container: { position: 'relative', height: 60, }, + loader: {}, + color: theme.colorText, }); class LoaderComponent extends Component { render() { - const { classes, className, color, theme } = this.props; + const { classes, className, color } = this.props; return (
{ loaded={false} width={4} scale={0.75} - color={color || theme.colorText} + color={color || classes.color} parentClassName={classes.loader} />
@@ -41,4 +41,6 @@ class LoaderComponent extends Component { } } -export const Loader = injectStyle(styles)(withTheme(LoaderComponent)); +export const Loader = injectStyle(styles, { injectTheme: true })( + LoaderComponent, +); -- cgit v1.2.3-70-g09d2