File tree Expand file tree Collapse file tree 4 files changed +20
-13
lines changed
ui-webc/src/components/drawer Expand file tree Collapse file tree 4 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export const BasicExample = meta.story({
2323 } ,
2424 render : ( args ) => (
2525 < div >
26- < p > some content within the page</ p >
26+ < p > some content within the page. Make sure the Drawer is placed in the root. </ p >
2727 < ScoutDrawer { ...args } >
2828 < p > Content inside the drawer</ p >
2929 </ ScoutDrawer >
Original file line number Diff line number Diff line change 1+ .drawer {
2+ width : 100% ;
3+ }
4+ /**
5+ * Mobile style
6+ */
17.drawer--container {
28 position : fixed;
39 bottom : 0 ;
3339}
3440
3541.open {
36- animation : drawerOpen 0.3s ease-out forwards;
42+ animation : drawerOpen 0.3s ease-in- out forwards;
3743}
3844.close {
39- animation : drawerClose 0.3s ease-out forwards;
45+ animation : drawerClose 0.3s ease-in- out forwards;
4046}
4147
42- /* Desktop drawer style */
48+ /**
49+ * Desktop style
50+ */
4351@media screen and (min-width : 901px ) {
4452 @keyframes drawerOpen {
4553 from {
6674 height : 100% ;
6775 max-height : 100% ;
6876 max-width : 90% ;
77+ min-height : 600px ;
6978 width : 430px ;
7079 transform : translateX (100% );
7180 border-top-left-radius : var (--spacing-5 );
7281 border-bottom-left-radius : var (--spacing-5 );
7382 border-top-right-radius : 0 ;
7483 }
7584 .open {
76- animation : drawerOpen 0.3s ease-out forwards;
85+ animation : drawerOpen 0.3s ease-in- out forwards;
7786 }
7887 .close {
79- animation : drawerClose 0.3s ease-out forwards;
88+ animation : drawerClose 0.3s ease-in- out forwards;
8089 }
8190}
8291
Original file line number Diff line number Diff line change @@ -65,9 +65,7 @@ export class ScoutDrawer implements ComponentInterface {
6565 componentWillLoad ( ) : Promise < void > | void {
6666 this . focusedNode = document . activeElement ;
6767 }
68- componentDidLoad ( ) : void {
69- this . setDrawerOpenState ( true ) ;
70- }
68+
7169 disconnectedCallback ( ) : void {
7270 this . focusedNode ;
7371 }
Original file line number Diff line number Diff line change 88| Property | Attribute | Description | Type | Default |
99| ----------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------ | --------- | ------- |
1010| ` backButtonLabel ` | ` back-button-label ` | Back button label. | ` string ` | ` "" ` |
11- | ` disableBackdrop ` | ` disable-backdrop ` | Disable backdrop for the drawer. Will also make it clickable to close the drawer. | ` boolean ` | ` false ` |
11+ | ` disableBackdrop ` | ` disable-backdrop ` | Disable backdrop for the drawer. | ` boolean ` | ` false ` |
1212| ` disableContentPadding ` | ` disable-content-padding ` | Disable drawer content padding. Use only if you have specific use case and you need to use full width. | ` boolean ` | ` false ` |
13- | ` exitButtonLabel ` | ` exit-button-label ` | Back button label. | ` string ` | ` "" ` |
14- | ` heading ` | ` heading ` | Open/close state of the drawer. | ` string ` | ` "" ` |
15- | ` open ` | ` open ` | Open/closestate of the drawer. | ` boolean ` | ` false ` |
13+ | ` exitButtonLabel ` | ` exit-button-label ` | Exit button label. | ` string ` | ` "" ` |
14+ | ` heading ` | ` heading ` | Heading within the sheet. | ` string ` | ` "" ` |
15+ | ` open ` | ` open ` | Open/close state of the drawer. | ` boolean ` | ` false ` |
1616| ` showBackButton ` | ` show-back-button ` | Render back button. | ` boolean ` | ` false ` |
1717| ` showExitButton ` | ` show-exit-button ` | Render exit button. | ` boolean ` | ` false ` |
1818
You can’t perform that action at this time.
0 commit comments