diff options
Diffstat (limited to 'packages/ui/src/badge/ProBadge.tsx')
-rw-r--r-- | packages/ui/src/badge/ProBadge.tsx | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/packages/ui/src/badge/ProBadge.tsx b/packages/ui/src/badge/ProBadge.tsx deleted file mode 100644 index be7ed8e58..000000000 --- a/packages/ui/src/badge/ProBadge.tsx +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | import { mdiStar } from '@mdi/js'; | ||
2 | import classnames from 'classnames'; | ||
3 | import { Component } from 'react'; | ||
4 | import injectStyle from 'react-jss'; | ||
5 | |||
6 | import { Badge, Icon } from '..'; | ||
7 | import { Theme } from '../../../theme'; | ||
8 | import { IWithStyle } from '../typings/generic'; | ||
9 | |||
10 | interface IProps extends IWithStyle { | ||
11 | badgeClasses?: string; | ||
12 | iconClasses?: string; | ||
13 | inverted?: boolean; | ||
14 | className?: string; | ||
15 | } | ||
16 | |||
17 | const styles = (theme: Theme) => ({ | ||
18 | badge: { | ||
19 | height: 'auto', | ||
20 | padding: [4, 6, 2, 7], | ||
21 | borderRadius: theme.borderRadiusSmall, | ||
22 | }, | ||
23 | invertedBadge: { | ||
24 | background: theme.styleTypes.primary.contrast, | ||
25 | color: theme.styleTypes.primary.accent, | ||
26 | }, | ||
27 | icon: { | ||
28 | fill: theme.styleTypes.primary.contrast, | ||
29 | }, | ||
30 | invertedIcon: { | ||
31 | fill: theme.styleTypes.primary.accent, | ||
32 | }, | ||
33 | }); | ||
34 | |||
35 | class ProBadgeComponent extends Component<IProps> { | ||
36 | render() { | ||
37 | const { classes, badgeClasses, iconClasses, inverted, className } = | ||
38 | this.props; | ||
39 | |||
40 | return ( | ||
41 | <Badge | ||
42 | type="primary" | ||
43 | className={classnames([ | ||
44 | classes.badge, | ||
45 | inverted && classes.invertedBadge, | ||
46 | badgeClasses, | ||
47 | className, | ||
48 | ])} | ||
49 | > | ||
50 | <Icon | ||
51 | icon={mdiStar} | ||
52 | className={classnames([ | ||
53 | classes.icon, | ||
54 | inverted && classes.invertedIcon, | ||
55 | iconClasses, | ||
56 | ])} | ||
57 | /> | ||
58 | </Badge> | ||
59 | ); | ||
60 | } | ||
61 | } | ||
62 | |||
63 | export const ProBadge = injectStyle(styles)(ProBadgeComponent); | ||