@@ -2,6 +2,8 @@ import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
22import { KbqButtonModule } from '@koobiq/components/button' ;
33import { KbqContentPanelModule } from '@koobiq/components/content-panel' ;
44import { KbqLocalDropzone , KbqSingleFileUploadComponent } from '@koobiq/components/file-upload' ;
5+ import { KbqIcon } from '@koobiq/components/icon' ;
6+ import { KbqSidebar , KbqSidebarClosed , KbqSidebarOpened , SidebarPositions } from '@koobiq/components/sidebar' ;
57
68/**
79 * @title File-upload local dropzone
@@ -12,40 +14,63 @@ import { KbqLocalDropzone, KbqSingleFileUploadComponent } from '@koobiq/componen
1214 KbqLocalDropzone ,
1315 KbqButtonModule ,
1416 KbqContentPanelModule ,
15- KbqSingleFileUploadComponent
17+ KbqSidebar ,
18+ KbqSidebarOpened ,
19+ KbqSidebarClosed ,
20+ KbqSingleFileUploadComponent ,
21+ KbqIcon
1622 ] ,
1723 template : `
18- <kbq-content-panel-container maxWidth="400" minWidth="400" x [opened]="true" [disableClose]="true">
19- Manchester United, one of the most iconic football clubs in the world, is renowned for its rich history,
20- legendary players, and unparalleled success.
24+ <main>
25+ <div>
26+ Manchester United, one of the most iconic football clubs in the world, is renowned for its rich history,
27+ legendary players, and unparalleled success.
28+ </div>
29+ </main>
2130
22- <kbq-content-panel>
23- <kbq-content-panel-body kbqLocalDropzone [kbqConnectedTo]="fileUploadLocal">
24- <div class="layout-margin-bottom-m layout-margin-top-xxl">Drag your files on sidepanel</div>
31+ <kbq-sidebar
32+ #rightSidebar="kbqSidebar"
33+ kbqLocalDropzone
34+ [opened]="true"
35+ [position]="position.Right"
36+ [kbqConnectedTo]="fileUploadLocal"
37+ >
38+ <div kbq-sidebar-opened width="100%" minWidth="350px" maxWidth="350px">
39+ <div class="layout-margin-bottom-m">Drag your files on sidepanel</div>
2540
26- <kbq-file-upload #fileUploadLocal />
27- </kbq-content-panel-body>
28- </kbq-content-panel>
29- </kbq-content-panel-container>
41+ <kbq-file-upload #fileUploadLocal>
42+ <i kbq-icon="kbq-file-text-o_16"></i>
43+ </kbq-file-upload>
44+ </div>
45+ <div kbq-sidebar-closed width="100px"></div>
46+ </kbq-sidebar>
3047 ` ,
3148 styles : `
3249 :host {
3350 display: flex;
34- flex-direction: column;
35- height: 500px;
51+ height: 248px;
3652 }
3753
38- .example-content-panel-container__content {
54+ main {
55+ flex-grow: 1;
3956 display: flex;
4057 flex-direction: column;
41- gap: var(--kbq-size-s);
42- align-items: center;
43- justify-content: center;
58+ gap: var(--kbq-size-m);
59+ padding: var(--kbq-size-m);
60+ }
61+
62+ .kbq-sidebar {
63+ background: var(--kbq-background-bg);
64+ box-shadow: var(--kbq-shadow-overlay);
65+ padding: var(--kbq-size-xxl);
66+ border-radius: var(--kbq-size-border-radius);
4467 height: 100%;
68+ box-sizing: border-box;
4569 }
4670 ` ,
4771 changeDetection : ChangeDetectionStrategy . OnPush
4872} )
4973export class FileUploadLocalDropzoneExample {
5074 protected readonly value = signal ( false ) ;
75+ readonly position = SidebarPositions ;
5176}
0 commit comments