File tree Expand file tree Collapse file tree 3 files changed +57
-0
lines changed
packages/live-web-view/content Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ import live-web.dom
2+ import live-web
3+ import live-elements-web-server.view
4+ import live-elements-web-server.style
5+
6+ component Alert < Div{
7+
8+ string type: null
9+
10+ static any[] use = [
11+ AlertContent,
12+ ScopedStyle{ src: './style/alert.css' process: '../style/CSSProcessor.lv' },
13+ ScopedStyle{ src: '../style/global.css' process: '../style/CSSProcessor.lv' }
14+ ]
15+
16+ string[] extraClasses: []
17+ classes: this.extraClasses.concat([
18+ ScopedStyle.className(Alert),
19+ this.type ? `type-${this.type}` : '',
20+ ])
21+ }
Original file line number Diff line number Diff line change 1+ import live-web.dom
2+ import live-web
3+ import live-elements-web-server.view
4+ import live-elements-web-server.style
5+
6+ component AlertContent < Div{
7+ string[] extraClasses: []
8+ classes: this.extraClasses.concat(ScopedStyle.className(AlertContent))
9+ }
Original file line number Diff line number Diff line change 1+ & Alert {
2+ @apply flex flex-row items-start bg-white dark:bg-[# 111 ] text-black dark:text-[# e1e1e1 ] rounded shadow-md max-w-sm overflow-hidden;
3+ @apply border border-[# 313131 ] p-4 px-4;
4+ }
5+ & AlertContent {
6+ @apply text-left;
7+ flex-grow : 1 ;
8+ }
9+ & Alert& .type-error {
10+ @apply border-[rgb (162 , 32 , 40 , 0.80 )];
11+ }
12+ & Alert& .type-error heading {
13+ @apply text-[rgb (162 , 32 , 40 )];
14+ }
15+ figure {
16+ @apply p-1 pr-4;
17+ flex-shrink : 0 ;
18+ }
19+ & Alert& .type-error figure svg {
20+ @apply text-[rgb (162 , 32 , 40 )];
21+ }
22+ section {
23+ @apply text-base text-left leading-snug;
24+ }
25+ section header {
26+ @apply mb-1;
27+ }
You can’t perform that action at this time.
0 commit comments