forked from riccardoperra/codeimage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRadioBlock.css.ts
36 lines (34 loc) · 1.11 KB
/
RadioBlock.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
import {style} from '@vanilla-extract/css';
import {recipe, RecipeVariants} from '@vanilla-extract/recipes';
import * as groupStyles from '../Group/Group.css';
import * as textFieldStyles from '../TextField/TextField.css';
import {themeVars} from '../../theme';
export const radioBlock = recipe({
base: style([
textFieldStyles.baseField,
{
transition: 'border .2s, color .2s',
selectors: {
[`${groupStyles.base}:nth-child(n) &`]: {
borderRadius: 0,
},
[`${groupStyles.base}[data-orientation="vertical"] &:first-child`]: {
borderTopLeftRadius: themeVars.borderRadius.md,
borderTopRightRadius: themeVars.borderRadius.md,
},
[`${groupStyles.base}[data-orientation="vertical"] &:last-child`]: {
borderBottomLeftRadius: themeVars.borderRadius.md,
borderBottomRightRadius: themeVars.borderRadius.md,
},
},
},
]),
variants: {
selected: {
true: {
borderColor: themeVars.backgroundColor.blue['500'],
},
},
},
});
export type RadioBlockVariants = RecipeVariants<typeof radioBlock>;