feat: modify sidebar style (#1508)
This commit is contained in:
@@ -36,6 +36,7 @@ export const SidebarSwitch = ({
|
|||||||
>
|
>
|
||||||
<StyledSidebarSwitch
|
<StyledSidebarSwitch
|
||||||
visible={visible}
|
visible={visible}
|
||||||
|
disabled={!visible}
|
||||||
data-testid={testid}
|
data-testid={testid}
|
||||||
onClick={useCallback(() => {
|
onClick={useCallback(() => {
|
||||||
setOpen(!open);
|
setOpen(!open);
|
||||||
|
|||||||
@@ -1,23 +1,10 @@
|
|||||||
import { styled } from '@affine/component';
|
import { IconButton, styled } from '@affine/component';
|
||||||
|
|
||||||
export const StyledSidebarSwitch = styled('button')<{ visible: boolean }>(
|
export const StyledSidebarSwitch = styled(IconButton)<{ visible: boolean }>(
|
||||||
({ theme, visible }) => {
|
({ visible }) => {
|
||||||
return {
|
return {
|
||||||
display: 'inline-flex',
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
color: theme.colors.innerHoverBackground,
|
|
||||||
width: '32px',
|
|
||||||
height: '32px',
|
|
||||||
borderRadius: '8px',
|
|
||||||
opacity: visible ? 1 : 0,
|
opacity: visible ? 1 : 0,
|
||||||
transition: 'all 0.2s ease-in-out',
|
transition: 'all 0.2s ease-in-out',
|
||||||
...(visible ? {} : { cursor: 'not-allowed', pointerEvents: 'none' }),
|
|
||||||
|
|
||||||
':hover': {
|
|
||||||
background: '#F1F1F4',
|
|
||||||
color: theme.colors.iconColor,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ import { MuiAvatar, textEllipsis } from '@affine/component';
|
|||||||
import { styled } from '@affine/component';
|
import { styled } from '@affine/component';
|
||||||
export const SelectorWrapper = styled('div')(({ theme }) => {
|
export const SelectorWrapper = styled('div')(({ theme }) => {
|
||||||
return {
|
return {
|
||||||
height: '64px',
|
marginTop: '4px',
|
||||||
|
height: '56px',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
padding: '0 44px 0 12px',
|
padding: '0 44px 0 12px',
|
||||||
|
|||||||
Reference in New Issue
Block a user