mirror of https://github.com/fantasticit/think.git
Merge pull request #34 from fantasticit/feat/mobile
This commit is contained in:
commit
dc01bac693
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue