mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
feat: support subpage (#1663)
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import MuiCollapse from '@mui/material/Collapse';
|
||||
|
||||
import { styled } from '../../styles';
|
||||
|
||||
export const StyledCollapse = styled(MuiCollapse)(() => {
|
||||
return {
|
||||
paddingLeft: '12px',
|
||||
};
|
||||
});
|
||||
export const StyledTreeNodeItem = styled('div')<{
|
||||
isOver?: boolean;
|
||||
canDrop?: boolean;
|
||||
}>(({ isOver, canDrop, theme }) => {
|
||||
return {
|
||||
background: isOver && canDrop ? theme.colors.hoverBackground : '',
|
||||
position: 'relative',
|
||||
};
|
||||
});
|
||||
export const StyledTreeNodeContainer = styled('div')<{ isDragging: boolean }>(
|
||||
({ isDragging, theme }) => {
|
||||
return {
|
||||
background: isDragging ? theme.colors.hoverBackground : '',
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
export const StyledNodeLine = styled('div')<{ show: boolean; isTop?: boolean }>(
|
||||
({ show, isTop = false, theme }) => {
|
||||
return {
|
||||
position: 'absolute',
|
||||
left: '0',
|
||||
...(isTop ? { top: '0' } : { bottom: '0' }),
|
||||
width: '100%',
|
||||
paddingTop: '3px',
|
||||
borderBottom: '3px solid',
|
||||
borderColor: show ? theme.colors.primaryColor : 'transparent',
|
||||
zIndex: 1,
|
||||
};
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user