@loadsmart/loadsmart-ui 5.6.1 → 5.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -52,3 +52,32 @@ export const Playground: Story<DrawerProps> = ({ open, ...others }: DrawerProps)
|
|
|
52
52
|
Playground.args = {
|
|
53
53
|
open: false,
|
|
54
54
|
}
|
|
55
|
+
|
|
56
|
+
export const SmallerContentPlayground: Story<DrawerProps> = ({ open, ...others }: DrawerProps) => {
|
|
57
|
+
const { open: isOpen, show, hide } = useDrawer({ open: open })
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<div className="flex flex-col space-y-2">
|
|
61
|
+
<div className="flex items-center">
|
|
62
|
+
<Button onClick={show}>Open Drawer</Button>
|
|
63
|
+
<Drawer {...others} open={isOpen} onClose={hide}>
|
|
64
|
+
<Drawer.Header>Drawer Header</Drawer.Header>
|
|
65
|
+
<Drawer.Body>
|
|
66
|
+
{TWENTY_SIZE_ARR.slice(0, 3).map((_, index) => (
|
|
67
|
+
<h1 key={index} className="mb-6">
|
|
68
|
+
Drawer Body...
|
|
69
|
+
</h1>
|
|
70
|
+
))}
|
|
71
|
+
</Drawer.Body>
|
|
72
|
+
<Drawer.Footer className="justify-end">
|
|
73
|
+
<Button onClick={hide}>Close Drawer</Button>
|
|
74
|
+
</Drawer.Footer>
|
|
75
|
+
</Drawer>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
SmallerContentPlayground.args = {
|
|
82
|
+
open: false,
|
|
83
|
+
}
|