diff options
Diffstat (limited to 'src/components/ui/icon/index.tsx')
-rw-r--r-- | src/components/ui/icon/index.tsx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/components/ui/icon/index.tsx b/src/components/ui/icon/index.tsx index 7e13b98c7..5b432a194 100644 --- a/src/components/ui/icon/index.tsx +++ b/src/components/ui/icon/index.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import MdiIcon from '@mdi/react'; | 1 | import MdiIcon from '@mdi/react'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { Component } from 'react'; | 3 | import { Component, ReactElement } from 'react'; |
4 | import injectStyle, { WithStylesProps } from 'react-jss'; | 4 | import injectStyle, { WithStylesProps } from 'react-jss'; |
5 | 5 | ||
6 | import { Theme } from '../../../themes'; | 6 | import { Theme } from '../../../themes'; |
@@ -18,12 +18,8 @@ const styles = (theme: Theme) => ({ | |||
18 | }); | 18 | }); |
19 | 19 | ||
20 | class IconComponent extends Component<IProps> { | 20 | class IconComponent extends Component<IProps> { |
21 | public static defaultProps = { | 21 | render(): ReactElement { |
22 | size: 1, | 22 | const { classes, icon, size = 1, className } = this.props; |
23 | }; | ||
24 | |||
25 | render() { | ||
26 | const { classes, icon, size, className } = this.props; | ||
27 | 23 | ||
28 | if (!icon) { | 24 | if (!icon) { |
29 | console.warn('No Icon specified'); | 25 | console.warn('No Icon specified'); |