Merge pull request #34 from fantasticit/feat/mobile

This commit is contained in:
fantasticit 2022-05-04 17:28:31 +08:00 committed by GitHub
commit dc01bac693
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import cls from 'classnames';
import { Layout as SemiLayout, Button } from '@douyinfe/semi-ui';
import { IconChevronLeft, IconChevronRight } from '@douyinfe/semi-icons';
import SplitPane from 'react-split-pane';
import { useDragableWidth, MIN_WIDTH, MAX_WIDTH } from 'hooks/use-dragable-width';
import { useDragableWidth } from 'hooks/use-dragable-width';
import styles from './index.module.scss';
const { Sider, Content } = SemiLayout;
@ -14,11 +14,11 @@ interface IProps {
}
export const PublicDoubleColumnLayout: React.FC<IProps> = ({ leftNode, rightNode }) => {
const { width, isCollapsed, updateWidth, toggleCollapsed } = useDragableWidth();
const { minWidth, maxWidth, width, isCollapsed, updateWidth, toggleCollapsed } = useDragableWidth();
return (
<SemiLayout className={styles.wrap}>
<SplitPane minSize={MIN_WIDTH} maxSize={MAX_WIDTH} size={width} onChange={updateWidth}>
<SplitPane minSize={minWidth} maxSize={maxWidth} size={width} onChange={updateWidth}>
<Sider style={{ width: '100%', height: '100%' }} className={styles.leftWrap}>
<Button
size="small"