@@ -62,7 +62,11 @@ const DemoSection = ({ title, children }: { title: any; children: any }) => {
62
62
) ;
63
63
} ;
64
64
65
- const NavigationContent = ( { setShowNavigationModal } : { setShowNavigationModal : ( value : boolean ) => void } ) => {
65
+ const NavigationContent = ( {
66
+ setShowNavigationModal,
67
+ } : {
68
+ setShowNavigationModal : ( value : boolean ) => void ;
69
+ } ) => {
66
70
return (
67
71
< >
68
72
< Link href = { "/" } >
@@ -193,6 +197,7 @@ export default function Home() {
193
197
useState ( false ) ;
194
198
195
199
const [ showNavigationModal , setShowNavigationModal ] = useState ( false ) ;
200
+ const [ extendRail , setExtendRail ] = useState ( false ) ;
196
201
197
202
const [ isExpanded , setIsExpanded ] = useState ( false ) ;
198
203
@@ -235,9 +240,7 @@ export default function Home() {
235
240
( showNavigationModal ? "-translate-x-0" : "-translate-x-50" )
236
241
}
237
242
>
238
- < NavigationContent
239
- setShowNavigationModal = { setShowNavigationModal }
240
- />
243
+ < NavigationContent setShowNavigationModal = { setShowNavigationModal } />
241
244
</ NavigationDrawerModal >
242
245
</ div >
243
246
< div
@@ -246,11 +249,12 @@ export default function Home() {
246
249
>
247
250
< div className = "flex sticky top-0 overflow-y-auto h-screen" >
248
251
< div className = "" id = "nav-rail-container" >
249
- < NavigationRail active-index = "1" >
252
+ { /* @ts -expect-error */ }
253
+ < NavigationRail extended = { extendRail } >
250
254
< IconButton
251
255
slot = "menu"
252
256
id = "rail-menu-button"
253
- onClick = { ( ) => setShowNavigationModal ( true ) }
257
+ onClick = { ( ) => setExtendRail ( oldState => ! oldState ) }
254
258
>
255
259
< Icon > menu</ Icon >
256
260
</ IconButton >
@@ -317,10 +321,10 @@ export default function Home() {
317
321
< Column id = "column-a" >
318
322
< DemoSection title = { "Actions" } >
319
323
< ComponentDemo title = { "Common buttons" } >
320
- { /* @ts -ignore */ }
321
- < Stack direction = "row" spacing = { 2 } >
322
- { /* @ts -ignore */ }
323
- < Stack >
324
+ { /* @ts -ignore */ }
325
+ < Stack direction = "row" spacing = { 2 } >
326
+ { /* @ts -ignore */ }
327
+ < Stack >
324
328
< Button variant = "elevated" className = "w-full" >
325
329
Elevated
326
330
</ Button >
@@ -337,8 +341,8 @@ export default function Home() {
337
341
Text
338
342
</ Button >
339
343
</ Stack >
340
- { /* @ts -ignore */ }
341
- < Stack >
344
+ { /* @ts -ignore */ }
345
+ < Stack >
342
346
< Button variant = "elevated" className = "w-full" >
343
347
Icon
344
348
< Icon slot = "icon" > add</ Icon >
@@ -360,8 +364,8 @@ export default function Home() {
360
364
< Icon slot = "icon" > add</ Icon >
361
365
</ Button >
362
366
</ Stack >
363
- { /* @ts -ignore */ }
364
- < Stack >
367
+ { /* @ts -ignore */ }
368
+ < Stack >
365
369
< Button disabled variant = "elevated" className = "w-full" >
366
370
Elevated
367
371
</ Button >
@@ -382,8 +386,8 @@ export default function Home() {
382
386
</ ComponentDemo >
383
387
384
388
< ComponentDemo title = { "Floating action buttons" } >
385
- { /* @ts -ignore */ }
386
- < Stack direction = "row" >
389
+ { /* @ts -ignore */ }
390
+ < Stack direction = "row" >
387
391
< FAB size = "small" >
388
392
< Icon slot = "icon" > add</ Icon >
389
393
</ FAB >
@@ -400,8 +404,8 @@ export default function Home() {
400
404
</ ComponentDemo >
401
405
402
406
< ComponentDemo title = { "Icon buttons" } >
403
- { /* @ts -ignore */ }
404
- < Stack direction = "row" spacing = { 4 } >
407
+ { /* @ts -ignore */ }
408
+ < Stack direction = "row" spacing = { 4 } >
405
409
< IconButton >
406
410
< Icon > Settings</ Icon >
407
411
</ IconButton >
@@ -418,8 +422,8 @@ export default function Home() {
418
422
< Icon > Settings</ Icon >
419
423
</ IconButton >
420
424
</ Stack >
421
- { /* @ts -ignore */ }
422
- < Stack direction = "row" spacing = { 4 } >
425
+ { /* @ts -ignore */ }
426
+ < Stack direction = "row" spacing = { 4 } >
423
427
< IconButton disabled >
424
428
< Icon > Settings</ Icon >
425
429
</ IconButton >
@@ -469,8 +473,8 @@ export default function Home() {
469
473
470
474
< DemoSection title = "Communication" >
471
475
< ComponentDemo title = { "Badges" } >
472
- { /* @ts -ignore */ }
473
- < Stack direction = "row" spacing = { 3 } >
476
+ { /* @ts -ignore */ }
477
+ < Stack direction = "row" spacing = { 3 } >
474
478
< IconButton >
475
479
< Icon
476
480
style = { {
@@ -495,8 +499,8 @@ export default function Home() {
495
499
</ ComponentDemo >
496
500
497
501
< ComponentDemo title = { "Progress indicators" } >
498
- { /* @ts -ignore */ }
499
- < Stack direction = "row" spacing = { 10 } >
502
+ { /* @ts -ignore */ }
503
+ < Stack direction = "row" spacing = { 10 } >
500
504
< IconButton
501
505
onClick = { ( ) =>
502
506
setIsPlayingProgressIndicators ( ( oldState ) => ! oldState )
@@ -864,9 +868,7 @@ export default function Home() {
864
868
</ ComponentDemo >
865
869
866
870
< ComponentDemo title = { "Navigation bar" } >
867
- < NavigationBar
868
- className = "w-full flex flex-row items-center"
869
- >
871
+ < NavigationBar className = "w-full flex flex-row items-center" >
870
872
< NavigationTab className = "px-4" label = "Explore" disabled >
871
873
< Icon
872
874
slot = "active-icon"
@@ -928,7 +930,9 @@ export default function Home() {
928
930
< Icon > arrow_back</ Icon >
929
931
</ IconButton >
930
932
931
- < div slot = "headline" className = "line-clamp-1" > Center-aligned</ div >
933
+ < div slot = "headline" className = "line-clamp-1" >
934
+ Center-aligned
935
+ </ div >
932
936
933
937
< IconButton slot = "trailing" >
934
938
< Icon > more_vert</ Icon >
@@ -958,7 +962,9 @@ export default function Home() {
958
962
< AppBar
959
963
variant = "medium"
960
964
className = { "sticky top-0 z-40 !bg-[#fef7fe]" }
961
- onExpansionChange = { ( expanded : boolean ) => setIsExpanded ( expanded ) }
965
+ onExpansionChange = { ( expanded : boolean ) =>
966
+ setIsExpanded ( expanded )
967
+ }
962
968
style = { {
963
969
// @ts -ignore
964
970
"--md-elevation-level" : 1 ,
0 commit comments