mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-28 07:51:55 +03:00
fix: padding in the Switch button of Page/Edgeless (#3542)
This commit is contained in:
parent
78d23d86f5
commit
3282344d4a
@ -5,14 +5,15 @@ export const StyledEditorModeSwitch = styled('div')<{
|
|||||||
showAlone?: boolean;
|
showAlone?: boolean;
|
||||||
}>(({ switchLeft, showAlone }) => {
|
}>(({ switchLeft, showAlone }) => {
|
||||||
return {
|
return {
|
||||||
width: showAlone ? '40px' : '78px',
|
maxWidth: showAlone ? '40px' : '70px',
|
||||||
|
gap: '8px',
|
||||||
height: '32px',
|
height: '32px',
|
||||||
background: showAlone
|
background: showAlone
|
||||||
? 'transparent'
|
? 'transparent'
|
||||||
: 'var(--affine-background-secondary-color)',
|
: 'var(--affine-background-secondary-color)',
|
||||||
borderRadius: '12px',
|
borderRadius: '12px',
|
||||||
...displayFlex('space-between', 'center'),
|
...displayFlex('space-between', 'center'),
|
||||||
padding: '0 8px',
|
padding: '4px 4px',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
|
|
||||||
'::after': {
|
'::after': {
|
||||||
@ -25,7 +26,7 @@ export const StyledEditorModeSwitch = styled('div')<{
|
|||||||
borderRadius: '8px',
|
borderRadius: '8px',
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
transform: `translateX(${switchLeft ? '0' : '38px'})`,
|
transform: `translateX(${switchLeft ? '0' : '32px'})`,
|
||||||
transition: 'all .15s',
|
transition: 'all .15s',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user