feat: support subpage (#1663)

This commit is contained in:
Qi
2023-03-23 13:47:07 +08:00
committed by GitHub
parent 2551785451
commit 6a7b5601aa
26 changed files with 824 additions and 82 deletions
@@ -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,
};
}
);