forked from mui/material-ui
/
badgeClasses.ts
78 lines (73 loc) · 2.81 KB
/
badgeClasses.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import { generateUtilityClass, generateUtilityClasses } from '../className';
export interface BadgeClasses {
/** Class name applied to the root element. */
root: string;
/** Class name applied to the badge `span` element. */
badge: string;
/** Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'right' }}`. */
anchorOriginTopRight: string;
/** Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'right' }}`. */
anchorOriginBottomRight: string;
/** Class name applied to the badge `span` element if `anchorOrigin={{ 'top', 'left' }}`. */
anchorOriginTopLeft: string;
/** Class name applied to the badge `span` element if `anchorOrigin={{ 'bottom', 'left' }}`. */
anchorOriginBottomLeft: string;
/** Styles applied to the badge `span` element if `color="primary"`. */
colorPrimary: string;
/** Styles applied to the badge `span` element if `color="danger"`. */
colorDanger: string;
/** Styles applied to the badge `span` element if `color="info"`. */
colorInfo: string;
/** Styles applied to the badge `span` element if `color="neutral"`. */
colorNeutral: string;
/** Styles applied to the badge `span` element if `color="success"`. */
colorSuccess: string;
/** Styles applied to the badge `span` element if `color="warning"`. */
colorWarning: string;
/** State class applied to the badge `span` element if `invisible={true}`. */
invisible: string;
/** State class applied to the badge `span` element if `location="inside"`. */
locationInside: string;
/** State class applied to the badge `span` element if `location="outside"`. */
locationOutside: string;
/** Styles applied to the badge `span` element if `size="sm"`. */
sizeSm: string;
/** Styles applied to the badge `span` element if `size="md"`. */
sizeMd: string;
/** Styles applied to the badge `span` element if `size="lg"`. */
sizeLg: string;
/** Styles applied to the badge `span` element if `variant="outlined"`. */
variantOutlined: string;
/** Styles applied to the badge `span` element if `variant="soft"`. */
variantSoft: string;
/** Styles applied to the badge `span` element if `variant="solid"`. */
variantSolid: string;
}
export type BadgeClassKey = keyof BadgeClasses;
export function getBadgeUtilityClass(slot: string): string {
return generateUtilityClass('JoyBadge', slot);
}
const badgeClasses: BadgeClasses = generateUtilityClasses('JoyBadge', [
'root',
'badge',
'anchorOriginTopRight',
'anchorOriginBottomRight',
'anchorOriginTopLeft',
'anchorOriginBottomLeft',
'colorPrimary',
'colorDanger',
'colorInfo',
'colorNeutral',
'colorSuccess',
'colorWarning',
'invisible',
'locationInside',
'locationOutside',
'sizeSm',
'sizeMd',
'sizeLg',
'variantOutlined',
'variantSoft',
'variantSolid',
]);
export default badgeClasses;