feat: update filter button (#2609)

This commit is contained in:
Himself65 2023-05-31 11:26:20 +08:00 committed by GitHub
parent 0bb6e362bf
commit 1c7ae04f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 8 deletions

View File

@ -0,0 +1,7 @@
import { style } from '@vanilla-extract/css';
export const filterButton = style({
borderRadius: '8px',
padding: '2px 8px 2px 4px',
margin: '20px',
});

View File

@ -1,12 +1,10 @@
import { MenuItem, styled } from '@affine/component';
import { Button, MenuItem } from '@affine/component';
import { FilteredIcon } from '@blocksuite/icons';
import Menu from '../../../ui/menu/menu';
import { CreateFilterMenu } from '../filter/vars';
import type { useAllPageSetting } from '../use-all-page-setting';
const NoDragDiv = styled('div')`
-webkit-app-region: no-drag;
`;
import { filterButton } from './view-list.css';
export const ViewList = ({
setting,
@ -33,9 +31,9 @@ export const ViewList = ({
</div>
}
>
<NoDragDiv style={{ marginRight: 12, cursor: 'pointer' }}>
<Button style={{ marginRight: 12, cursor: 'pointer' }}>
{setting.currentView.name}
</NoDragDiv>
</Button>
</Menu>
)}
<Menu
@ -52,7 +50,9 @@ export const ViewList = ({
/>
}
>
<NoDragDiv style={{ cursor: 'pointer' }}>Filter</NoDragDiv>
<Button icon={<FilteredIcon />} className={filterButton}>
Filter
</Button>
</Menu>
</div>
);