diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-12-04 10:51:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-04 10:51:16 +0100 |
commit | 11c992b04f3cad6badf0ae86da65f490e31dd359 (patch) | |
tree | 749e63f6ba3e9bea48c186b5d8502d328edfd276 /src/components/ui/badge | |
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/badge')
-rw-r--r-- | src/components/ui/badge/ProBadge.tsx | 9 | ||||
-rw-r--r-- | src/components/ui/badge/index.tsx | 7 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/components/ui/badge/ProBadge.tsx b/src/components/ui/badge/ProBadge.tsx index dc1e76f7f..410748a64 100644 --- a/src/components/ui/badge/ProBadge.tsx +++ b/src/components/ui/badge/ProBadge.tsx | |||
@@ -1,14 +1,13 @@ | |||
1 | import { mdiStar } from '@mdi/js'; | 1 | import { mdiStar } from '@mdi/js'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { Component } from 'react'; | 3 | import { Component } from 'react'; |
4 | import injectStyle from 'react-jss'; | 4 | import injectStyle, { WithStylesProps } from 'react-jss'; |
5 | 5 | ||
6 | import { Theme } from '../../../themes'; | 6 | import { Theme } from '../../../themes'; |
7 | import { Icon } from '../icon'; | 7 | import { Icon } from '../icon'; |
8 | import { Badge } from './index'; | 8 | import { Badge } from './index'; |
9 | import { IWithStyle } from '../typings/generic'; | ||
10 | 9 | ||
11 | interface IProps extends IWithStyle { | 10 | interface IProps extends WithStylesProps<typeof styles> { |
12 | badgeClasses?: string; | 11 | badgeClasses?: string; |
13 | iconClasses?: string; | 12 | iconClasses?: string; |
14 | inverted?: boolean; | 13 | inverted?: boolean; |
@@ -61,4 +60,6 @@ class ProBadgeComponent extends Component<IProps> { | |||
61 | } | 60 | } |
62 | } | 61 | } |
63 | 62 | ||
64 | export const ProBadge = injectStyle(styles)(ProBadgeComponent); | 63 | export const ProBadge = injectStyle(styles, { injectTheme: true })( |
64 | ProBadgeComponent, | ||
65 | ); | ||
diff --git a/src/components/ui/badge/index.tsx b/src/components/ui/badge/index.tsx index 61bede937..a7ed866a5 100644 --- a/src/components/ui/badge/index.tsx +++ b/src/components/ui/badge/index.tsx | |||
@@ -1,11 +1,10 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, ReactNode } from 'react'; | 2 | import { Component, ReactNode } from 'react'; |
3 | import injectStyle from 'react-jss'; | 3 | import injectStyle, { WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import { Theme } from '../../../themes'; | 5 | import { Theme } from '../../../themes'; |
6 | import { IWithStyle } from '../typings/generic'; | ||
7 | 6 | ||
8 | interface IProps extends IWithStyle { | 7 | interface IProps extends WithStylesProps<typeof styles> { |
9 | type: string; | 8 | type: string; |
10 | className?: string; | 9 | className?: string; |
11 | children: ReactNode; | 10 | children: ReactNode; |
@@ -68,4 +67,4 @@ class BadgeComponent extends Component<IProps> { | |||
68 | } | 67 | } |
69 | } | 68 | } |
70 | 69 | ||
71 | export const Badge = injectStyle(styles)(BadgeComponent); | 70 | export const Badge = injectStyle(styles, { injectTheme: true })(BadgeComponent); |