fix: button style error (#3396)

This commit is contained in:
Qi
2023-07-27 13:37:00 +08:00
committed by GitHub
parent 04534c2008
commit fa8086d525
8 changed files with 86 additions and 94 deletions

View File

@@ -83,12 +83,6 @@ export const navBodyStyle = style({
flexDirection: 'column',
});
export const sidebarButtonStyle = style({
height: '32px',
color: 'var(--affine-icon-color)',
zIndex: 1,
});
export const sidebarFloatMaskStyle = style({
transition: 'opacity .15s',
opacity: 0,

View File

@@ -3,7 +3,6 @@ import { SidebarIcon } from '@blocksuite/icons';
import { useAtom } from 'jotai';
import { IconButton, Tooltip } from '../../../';
import { sidebarButtonStyle } from '../index.css';
import { appSidebarOpenAtom } from '../index.jotai';
export const SidebarSwitch = () => {
@@ -20,11 +19,14 @@ export const SidebarSwitch = () => {
zIndex={1000}
>
<IconButton
size="large"
data-testid={`app-sidebar-arrow-button-${open ? 'collapse' : 'expand'}`}
className={sidebarButtonStyle}
style={{
zIndex: 1,
}}
onClick={() => setOpen(open => !open)}
>
<SidebarIcon width={24} height={24} />
<SidebarIcon />
</IconButton>
</Tooltip>
);