chore: adjust sidebar padding (#3397)

This commit is contained in:
JimmFly
2023-07-27 13:36:45 +08:00
committed by GitHub
parent 780fffb88f
commit 04534c2008
2 changed files with 17 additions and 3 deletions
@@ -193,6 +193,7 @@ const CollectionRenderer = ({
/> />
<MenuItem <MenuItem
data-testid="collection-item" data-testid="collection-item"
data-type="collection-list-item"
ref={setNodeRef} ref={setNodeRef}
onCollapsedChange={setCollapsed} onCollapsedChange={setCollapsed}
active={isOver} active={isOver}
@@ -8,7 +8,7 @@ export const root = style({
minHeight: '30px', minHeight: '30px',
userSelect: 'none', userSelect: 'none',
cursor: 'pointer', cursor: 'pointer',
padding: '0 8px 0 12px', padding: '0 12px',
fontSize: 'var(--affine-font-sm)', fontSize: 'var(--affine-font-sm)',
margin: '2px 0', margin: '2px 0',
selectors: { selectors: {
@@ -32,7 +32,20 @@ export const root = style({
'&[data-collapsible="true"]': { '&[data-collapsible="true"]': {
width: 'calc(100% + 8px)', width: 'calc(100% + 8px)',
transform: 'translateX(-8px)', transform: 'translateX(-8px)',
paddingLeft: '8px', paddingLeft: '4px',
paddingRight: '12px',
},
'&[data-type="collection-list-item"][data-collapsible="false"]:hover': {
width: 'calc(100% + 8px)',
transform: 'translateX(-8px)',
paddingLeft: '20px',
paddingRight: '12px',
},
'&[data-type="favorite-list-item"][data-collapsible="false"]:hover': {
width: 'calc(100% + 8px)',
transform: 'translateX(-8px)',
paddingLeft: '20px',
paddingRight: '12px',
}, },
}, },
}); });
@@ -79,7 +92,7 @@ export const iconsContainer = style({
flexShrink: 0, flexShrink: 0,
selectors: { selectors: {
'&[data-collapsible="true"]': { '&[data-collapsible="true"]': {
width: '40px', width: '44px',
}, },
}, },
}); });