-
Notifications
You must be signed in to change notification settings - Fork 1
/
badge.css.ts
39 lines (36 loc) · 931 Bytes
/
badge.css.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
import {
createGlobalThemeContract,
fallbackVar,
style,
styleVariants,
} from '@vanilla-extract/css';
import { createGlobalThemeMapFn } from './css-helpers.js';
import { purposeVariantVars } from './purpose.css.js';
import { baseVars, type Prefix } from './vars.css.js';
/**
* Badge vars
*/
export const badgeVarsMapFnPrefix = 'badge' satisfies Prefix;
export const badgeVars = createGlobalThemeContract(
{
// border: {
// radius: '',
// width: '',
// },
borderStyle: 'solid',
},
createGlobalThemeMapFn(badgeVarsMapFnPrefix),
);
const badgeClassName = style({
borderRadius: baseVars.border.radius,
borderWidth: baseVars.border.width,
borderStyle: 'solid',
});
export const badgePurposeClassNames = styleVariants(purposeVariantVars, (v) => [
badgeClassName,
{
color: v.fgColor,
backgroundColor: v.bgColor,
borderColor: fallbackVar(v.borderColor, v.bgColor),
},
]);