File tree Expand file tree Collapse file tree 4 files changed +60
-24
lines changed
Expand file tree Collapse file tree 4 files changed +60
-24
lines changed Original file line number Diff line number Diff line change 1- import { classMap } from 'lit/directives/class-map.js' ;
21import { html , nothing } from 'lit/html.js' ;
32
43import { endIconListTemplate } from './_end-icon-list.js' ;
54import { gecutIconButton } from '../icon-button/icon-button.js' ;
65
76import type { TopBarContent } from './_type.js' ;
87
9- export const gecutCenterTopBar = ( content : TopBarContent , scroll = false ) =>
10- html `< header
11- class ="z-sticky flex h-16 shrink-0 grow-0 select-none items-center
12- bg-surface [&.scroll]:bg-surfaceContainer ${ classMap ( { scroll} ) } "
13- >
14- ${ content . startIcon ? gecutIconButton ( content . startIcon ) : nothing }
8+ export const gecutCenterTopBar = ( content : TopBarContent ) => html `
9+ < header class ="gecut-top-bar center ">
10+ < div class ="gecut-top-bar-box ">
11+ < div > ${ content . startIcon ? gecutIconButton ( content . startIcon ) : nothing } </ div >
1512
16- < div class ="lead grow overflow-clip whitespace-nowrap px-1 text-center text-titleLarge text-onSurface ">
17- ${ content . title }
18- </ div >
13+ < div class ="gecut-top-bar-title ">
14+ < h1 > ${ content . title } </ h1 >
15+ </ div >
1916
20- ${ endIconListTemplate ( content . endIconList ) }
21- </ header > ` ;
17+ < div > ${ endIconListTemplate ( content . endIconList ) } </ div >
18+ </ div >
19+ </ header >
20+ ` ;
Original file line number Diff line number Diff line change 1- import { classMap } from 'lit/directives/class-map.js' ;
21import { html , nothing } from 'lit/html.js' ;
32
43import { endIconListTemplate } from './_end-icon-list.js' ;
54import { gecutIconButton } from '../icon-button/icon-button.js' ;
65
76import type { TopBarContent } from './_type.js' ;
87
9- export const gecutSmallTopBar = ( content : TopBarContent , scroll = false ) =>
10- html `< header
11- class ="z-sticky flex h-16 shrink-0 grow-0 select-none items-center
12- bg-surface [&.scroll]:bg-surfaceContainer ${ classMap ( { scroll} ) } "
13- >
14- ${ content . startIcon ? gecutIconButton ( content . startIcon ) : nothing }
8+ export const gecutSmallTopBar = ( content : TopBarContent ) => html `
9+ < header class ="gecut-top-bar small ">
10+ < div class ="gecut-top-bar-box ">
11+ < div > ${ content . startIcon ? gecutIconButton ( content . startIcon ) : nothing } </ div >
1512
16- < div class ="lead me-auto overflow-clip whitespace-nowrap px-1 text-center text-titleLarge text-onSurface ">
17- ${ content . title }
18- </ div >
13+ < div class ="gecut-top-bar-title ">
14+ < h1 > ${ content . title } </ h1 >
15+ </ div >
1916
20- ${ endIconListTemplate ( content . endIconList ) }
21- </ header > ` ;
17+ < div > ${ endIconListTemplate ( content . endIconList ) } </ div >
18+ </ div >
19+ </ header >
20+ ` ;
Original file line number Diff line number Diff line change 55@import './item.css' ;
66@import './list.css' ;
77@import './snack-bar.css' ;
8+ @import './top-bar.css' ;
Original file line number Diff line number Diff line change 1+ @layer components {
2+ .gecut-top-bar {
3+ & -box {
4+ & > div {
5+ @apply flex items-center justify-center;
6+ }
7+
8+ @apply max-w-screen-sm mx-auto flex px-1 py-2 w-full h-full * : h-auto relative;
9+ }
10+
11+ & -title {
12+ h1 {
13+ @apply w-full;
14+ }
15+
16+ @apply text-titleLarge text-primary grow px-2;
17+ }
18+
19+ & .center {
20+ .gecut-top-bar-title > h1 {
21+ @apply text-center;
22+ }
23+ }
24+
25+ & .small {
26+ .gecut-top-bar-title > h1 {
27+ @apply text-start;
28+ }
29+ }
30+
31+ .gecut-button {
32+ @apply px-4;
33+ }
34+
35+ @apply fixed top-0 inset-x-0 bg-surfaceContainer translucent flex flex-col;
36+ }
37+ }
You can’t perform that action at this time.
0 commit comments