fix: switch style: remove border and shadow (#7423)

- remove border and shadow
- fix position

before 👇
![shot-2024-07-04-11 55 38@2x](https://github.com/toeverything/AFFiNE/assets/24713927/81776294-1cb3-49a9-b6d6-bd800c91b847)

after 👇
![shot-2024-07-04-12 01 20@2x](https://github.com/toeverything/AFFiNE/assets/24713927/812d4567-9c17-4c14-af4f-6eba97f077da)
This commit is contained in:
hwangdev97
2024-07-04 04:20:47 +00:00
parent a0ce75c902
commit b79d13bcc8

View File

@@ -17,8 +17,6 @@ export const switchStyle = style({
background: cssVar('toggleDisableBackgroundColor'),
borderRadius: '37px',
transition: '200ms all',
border: `1px solid ${cssVar('black10')}`,
boxShadow: cssVar('toggleCircleShadow'),
selectors: {
'&:before': {
transition: 'all .2s cubic-bezier(0.27, 0.2, 0.25, 1.51)',
@@ -28,9 +26,8 @@ export const switchStyle = style({
height: '20px',
borderRadius: '50%',
top: '50%',
border: `1px solid ${cssVar('black10')}`,
background: cssVar('toggleCircleBackgroundColor'),
transform: 'translate(1px, -50%)',
transform: 'translate(3px, -50%)',
},
},
});
@@ -39,7 +36,7 @@ export const switchCheckedStyle = style({
selectors: {
'&:before': {
borderColor: cssVar('pureBlack10'),
transform: 'translate(21px,-50%)',
transform: 'translate(23px,-50%)',
},
},
});