Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/components/src/components/drawer/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,43 @@
left: 0;
height: 100vh;
max-height: 100%;

.drawer__content {
height: 100%;
}
}

&--right {
top: 0;
right: 0;
height: 100vh;
max-height: 100%;

.drawer__content {
height: 100%;
}
}

&--top {
left: 0;
top: 0;
width: 100vw;
max-width: 100%;

.drawer__content {
width: 100%;
}
}

&--bottom {
left: 0;
bottom: 0;
width: 100vw;
max-width: 100%;

.drawer__content {
width: 100%;
}
}
}

Expand Down
24 changes: 14 additions & 10 deletions packages/samples/react/src/components/drawer/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ export const DrawerBasic: FC = () => {
<DrawerRadioAlign value={align} onChange={(_, value) => setAlign(value as AlignPropType)} />
<div className="flex flex-wrap gap-4">
<KolDrawer ref={drawerElement} _label="I am a drawer" _align={align} _on={{ onClose: () => console.log('Drawer onClose triggered!') }}>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua.
</p>
<KolButton _label="Close drawer" _on={{ onClick: () => drawerElement.current?.close() }} />
<div className={align === 'left' || align == 'right' ? 'drawer-content-vertical' : ''}>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua.
</p>
<KolButton _label="Close drawer" _on={{ onClick: () => drawerElement.current?.close() }} />
</div>
</KolDrawer>
<KolButton _label="Open drawer" _on={{ onClick: () => drawerElement.current?.open() }} />
<KolDrawer
Expand All @@ -48,11 +50,13 @@ export const DrawerBasic: FC = () => {
_label="I am a Drawer Modal"
_on={{ onClose: () => console.log('Drawer Modal onClose triggered!') }}
>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua.
</p>
<KolButton _label="Close drawer modal" _on={{ onClick: () => drawerModalElement.current?.close() }} />
<div className={align === 'left' || align == 'right' ? 'drawer-content-vertical' : ''}>
<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua.
</p>
<KolButton _label="Close drawer modal" _on={{ onClick: () => drawerModalElement.current?.close() }} />
</div>
</KolDrawer>
<KolButton _label="Open drawer as modal" _on={{ onClick: () => drawerModalElement.current?.open() }} />
</div>
Expand Down
4 changes: 4 additions & 0 deletions packages/samples/react/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ hr {
width: 500px;
}

.drawer-content-vertical {
width: rem(400);
}

@media (min-width: 1024px) {
.app-container {
display: grid;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading