Skip to content

Commit a43c34f

Browse files
committed
fix(core): onboarding switch active state is invisible (#7928)
close AF-1262
1 parent c9a1a8c commit a43c34f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

packages/frontend/core/src/components/affine/onboarding/switch-widgets/style.css.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const switchButtons = style({
1616

1717
selectors: {
1818
// indicator
19-
'&::after': {
19+
'&::before': {
2020
content: '',
2121
width: '48px',
2222
height: '48px',
@@ -26,16 +26,22 @@ export const switchButtons = style({
2626
transition: 'transform 0.15s ease',
2727
boxShadow: 'var(--affine-shadow-1)',
2828
},
29-
'&[data-mode="edgeless"]::after': {
29+
'&[data-mode="edgeless"]::before': {
3030
transform: `translateX(64px)`,
3131
},
3232
},
3333
});
3434

3535
export const switchButton = style({
36+
width: 24,
37+
height: 24,
3638
transform: 'scale(2)',
39+
display: 'flex',
40+
alignItems: 'center',
41+
justifyContent: 'center',
3742
boxShadow: 'none',
3843
opacity: 0.6,
44+
cursor: 'pointer',
3945
selectors: {
4046
'&:nth-child(1)': {
4147
transformOrigin: 'left',

packages/frontend/core/src/components/affine/onboarding/switch-widgets/switch.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ export const EdgelessSwitchButtons = ({
3030
<PageSwitchItem
3131
className={styles.switchButton}
3232
data-active={mode === 'page'}
33-
active={mode === 'page'}
3433
onClick={onSwitchToPageMode}
3534
/>
3635
<EdgelessSwitchItem
3736
className={styles.switchButton}
3837
data-active={mode === 'edgeless'}
39-
active={mode === 'edgeless'}
4038
onClick={onSwitchToEdgelessMode}
4139
/>
4240
</div>

0 commit comments

Comments
 (0)