Skip to content

Commit e4109b6

Browse files
committed
Revert "refactor: simplify Default component by removing resizable panels and returning basic content"
This reverts commit 5252358.
1 parent 258b4c5 commit e4109b6

File tree

1 file changed

+72
-3
lines changed

1 file changed

+72
-3
lines changed
Lines changed: 72 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,74 @@
1-
function Default() {
2-
return <div>Default</div>;
3-
}
1+
'use client';
2+
3+
import { CircleDashed } from 'lucide-react';
4+
import { Card, ResizableHandle, ResizablePanel, ResizablePanelGroup } from 'soybean-react-ui';
5+
6+
const Default = () => {
7+
return (
8+
<Card
9+
split
10+
title="Resizable"
11+
>
12+
<ResizablePanelGroup
13+
className="max-w-md border rounded-lg"
14+
direction="horizontal"
15+
id="demo-group-1"
16+
>
17+
<ResizablePanel
18+
collapsible
19+
collapsedSize={10}
20+
defaultSize={50}
21+
id="demo-panel-1"
22+
minSize={20}
23+
>
24+
<div className="h-[200px] flex items-center justify-center p-6">
25+
<span className="font-semibold">One</span>
26+
</div>
27+
</ResizablePanel>
28+
<ResizableHandle
29+
withHandle
30+
id="demo-handle-1"
31+
/>
32+
<ResizablePanel
33+
defaultSize={50}
34+
id="demo-panel-2"
35+
minSize={20}
36+
>
37+
<ResizablePanelGroup
38+
direction="vertical"
39+
id="demo-group-2"
40+
>
41+
<ResizablePanel
42+
defaultSize={25}
43+
id="demo-panel-3"
44+
minSize={25}
45+
>
46+
<div className="h-full flex items-center justify-center p-6">
47+
<span className="font-semibold">Two</span>
48+
</div>
49+
</ResizablePanel>
50+
51+
<ResizableHandle
52+
withHandle
53+
id="demo-handle-2"
54+
>
55+
<CircleDashed />
56+
</ResizableHandle>
57+
58+
<ResizablePanel
59+
defaultSize={75}
60+
id="demo-panel-4"
61+
minSize={25}
62+
>
63+
<div className="h-full flex items-center justify-center p-6">
64+
<span className="font-semibold">Three</span>
65+
</div>
66+
</ResizablePanel>
67+
</ResizablePanelGroup>
68+
</ResizablePanel>
69+
</ResizablePanelGroup>
70+
</Card>
71+
);
72+
};
473

574
export default Default;

0 commit comments

Comments
 (0)