feat: support bookmark (#2458)

Co-authored-by: himself65 <himself65@outlook.com>
This commit is contained in:
Qi
2023-05-26 14:52:36 +08:00
committed by GitHub
parent f4b3830a0e
commit 6d3c273ffd
19 changed files with 1311 additions and 89 deletions

View File

@@ -13,6 +13,7 @@ export type IconMenuProps = PropsWithChildren<{
endIcon?: ReactElement;
iconSize?: [number, number];
disabled?: boolean;
active?: boolean;
}> &
HTMLAttributes<HTMLButtonElement>;

View File

@@ -51,7 +51,8 @@ export const StyledContent = styled('div')(() => {
export const StyledMenuItem = styled('button')<{
isDir?: boolean;
disabled?: boolean;
}>(({ isDir = false, disabled = false }) => {
active?: boolean;
}>(({ isDir = false, disabled = false, active = false }) => {
return {
width: '100%',
borderRadius: '5px',
@@ -82,5 +83,11 @@ export const StyledMenuItem = styled('button')<{
: {
backgroundColor: 'var(--affine-hover-color)',
},
...(active && !disabled
? {
backgroundColor: 'var(--affine-hover-color)',
}
: {}),
};
});