mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 19:53:48 +08:00
fix(core): onboarding switch active state is invisible (#7928)
close AF-1262
This commit is contained in:
+8
-2
@@ -16,7 +16,7 @@ export const switchButtons = style({
|
|||||||
|
|
||||||
selectors: {
|
selectors: {
|
||||||
// indicator
|
// indicator
|
||||||
'&::after': {
|
'&::before': {
|
||||||
content: '',
|
content: '',
|
||||||
width: '48px',
|
width: '48px',
|
||||||
height: '48px',
|
height: '48px',
|
||||||
@@ -26,16 +26,22 @@ export const switchButtons = style({
|
|||||||
transition: 'transform 0.15s ease',
|
transition: 'transform 0.15s ease',
|
||||||
boxShadow: 'var(--affine-shadow-1)',
|
boxShadow: 'var(--affine-shadow-1)',
|
||||||
},
|
},
|
||||||
'&[data-mode="edgeless"]::after': {
|
'&[data-mode="edgeless"]::before': {
|
||||||
transform: `translateX(64px)`,
|
transform: `translateX(64px)`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const switchButton = style({
|
export const switchButton = style({
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
transform: 'scale(2)',
|
transform: 'scale(2)',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
boxShadow: 'none',
|
boxShadow: 'none',
|
||||||
opacity: 0.6,
|
opacity: 0.6,
|
||||||
|
cursor: 'pointer',
|
||||||
selectors: {
|
selectors: {
|
||||||
'&:nth-child(1)': {
|
'&:nth-child(1)': {
|
||||||
transformOrigin: 'left',
|
transformOrigin: 'left',
|
||||||
|
|||||||
@@ -30,13 +30,11 @@ export const EdgelessSwitchButtons = ({
|
|||||||
<PageSwitchItem
|
<PageSwitchItem
|
||||||
className={styles.switchButton}
|
className={styles.switchButton}
|
||||||
data-active={mode === 'page'}
|
data-active={mode === 'page'}
|
||||||
active={mode === 'page'}
|
|
||||||
onClick={onSwitchToPageMode}
|
onClick={onSwitchToPageMode}
|
||||||
/>
|
/>
|
||||||
<EdgelessSwitchItem
|
<EdgelessSwitchItem
|
||||||
className={styles.switchButton}
|
className={styles.switchButton}
|
||||||
data-active={mode === 'edgeless'}
|
data-active={mode === 'edgeless'}
|
||||||
active={mode === 'edgeless'}
|
|
||||||
onClick={onSwitchToEdgelessMode}
|
onClick={onSwitchToEdgelessMode}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user