Skip to content

Commit 47bc357

Browse files
committed
feat: new colors * 6
1 parent 8b1ee34 commit 47bc357

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

src/components/fields/Switch/Switch.tsx

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,25 @@ const SwitchElement = tasty({
4949
placeSelf: 'center',
5050
radius: 'round',
5151
fill: {
52-
'': '#dark.50',
52+
'': '#white',
5353
checked: '#purple',
5454
disabled: '#dark.12',
5555
},
56-
color: '#white',
57-
border: false,
56+
color: {
57+
'': '#dark-03',
58+
checked: '#white',
59+
},
60+
border: {
61+
'': '#dark-05',
62+
checked: '#purple',
63+
},
5864
width: {
59-
'': '5.25x 5.25x',
65+
'': '5.5x 5.5x',
6066
'[data-size="small"]': '3.5x 3.5x',
6167
},
6268
height: {
6369
'': '3x 3x',
64-
'[data-size="small"]': '2x 2x',
70+
'[data-size="small"]': '2.25x 2.25x',
6571
},
6672
outline: {
6773
'': '#purple-03.0',
@@ -77,24 +83,27 @@ const SwitchElement = tasty({
7783
Thumb: {
7884
position: 'absolute',
7985
width: {
80-
'': '2.5x 2.5x',
86+
'': '2.25x 2.25x',
8187
'[data-size="small"]': '1.5x 1.5x',
8288
},
8389
height: {
84-
'': '2.5x 2.5x',
90+
'': '2.25x 2.25x',
8591
'[data-size="small"]': '1.5x 1.5x',
8692
},
8793
radius: 'round',
8894
fill: {
8995
'': 'currentColor',
9096
disabled: '#white.5',
9197
},
92-
shadow: '0px 2px 4px #dark.20;',
93-
top: '.25x',
98+
top: {
99+
'': '.375x',
100+
'[data-size="small"]': '.375x',
101+
},
94102
left: {
95-
'': '.25x',
96-
checked: '2.5x',
97-
'checked & [data-size="small"]': '1.75x',
103+
'': '.375x',
104+
'[data-size="small"]': '.375x',
105+
checked: '2.75x',
106+
'checked & [data-size="small"]': '1.5x',
98107
},
99108
transition: 'left, theme',
100109
cursor: 'pointer',

src/icons/Icon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const Icon = memo(
5050
props: CubeIconProps,
5151
ref: ForwardedRef<HTMLSpanElement>,
5252
) {
53-
const { size, styles, stroke, ...rest } = props;
53+
const { size, stroke, ...rest } = props;
5454

5555
const mergedProps =
5656
size != null && stroke != null

src/tokens.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const colors = {
3434
'note-bg': '251 239 219',
3535
'note-icon': '181 140 44',
3636
border: '227 227 233',
37-
'light-border': '238 238 241',
37+
'light-border': '237 237 240',
3838
};
3939

4040
function color(name, opacity = 1) {
@@ -50,6 +50,7 @@ const TOKENS = {
5050
'input-letter-spacing': '0.02em',
5151
'disabled-opacity': '.4',
5252
gap: '8px',
53+
'stroke-width': 1.5,
5354
'outline-width': 'calc(1rem / 16 * 3)',
5455
'border-width': '1px',
5556
radius: '6px',

0 commit comments

Comments
 (0)