File tree Expand file tree Collapse file tree 5 files changed +100
-0
lines changed
apps/qwik-demo-app/src/routes/Alert Expand file tree Collapse file tree 5 files changed +100
-0
lines changed Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+ import { SfIconClose } from 'qwik-storefront-ui' ;
3+
4+ export default component$ ( ( ) => {
5+ return (
6+ < div
7+ role = "alert"
8+ class = "flex items-start md:items-center max-w-[600px] shadow-md bg-negative-100 pr-2 pl-4 ring-1 ring-negative-300 typography-text-sm md:typography-text-base py-1 rounded-md"
9+ >
10+ < p class = "py-2 mr-2" > The password change was failed.</ p >
11+ < button
12+ type = "button"
13+ class = "py-1.5 px-3 md:py-2 md:px-4 rounded-md text-negative-700 hover:bg-negative-200 active:bg-negative-300 hover:text-negative-800 active:text-negative-900 ml-auto font-medium focus-visible:outline focus-visible:outline-offset"
14+ >
15+ Retry
16+ </ button >
17+ < button
18+ type = "button"
19+ class = "p-1.5 md:p-2 ml-2 rounded-md text-negative-700 hover:bg-negative-200 active:bg-negative-300 hover:text-negative-800 active:text-negative-900 focus-visible:outline focus-visible:outline-offset"
20+ aria-label = "Close error alert"
21+ >
22+ < SfIconClose class = "hidden md:block" />
23+ < SfIconClose size = "sm" class = "block md:hidden" />
24+ </ button >
25+ </ div >
26+ ) ;
27+ } ) ;
Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+
3+ export default component$ ( ( ) => {
4+ return (
5+ < div
6+ role = "alert"
7+ class = "bg-neutral-100 max-w-[600px] shadow-md pr-2 pl-4 ring-1 ring-neutral-300 typography-text-sm md:typography-text-base py-1 rounded-md"
8+ >
9+ < p class = "py-2" > Happy shopping!</ p >
10+ </ div >
11+ ) ;
12+ } ) ;
Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+ import { SfIconCheckCircle , SfIconClose } from 'qwik-storefront-ui' ;
3+
4+ export default component$ ( ( ) => {
5+ return (
6+ < div
7+ role = "alert"
8+ class = "flex items-start md:items-center max-w-[600px] shadow-md bg-positive-100 pr-2 pl-4 ring-1 ring-positive-200 typography-text-sm md:typography-text-base py-1 rounded-md"
9+ >
10+ < SfIconCheckCircle class = "my-2 mr-2 text-positive-700 shrink-0" />
11+ < p class = "py-2 mr-2" > The product has been added to the cart.</ p >
12+ < button
13+ type = "button"
14+ class = "p-1.5 md:p-2 ml-auto rounded-md text-positive-700 hover:bg-positive-200 active:bg-positive-300 hover:text-positive-800 active:text-positive-900 focus-visible:outline focus-visible:outline-offset"
15+ aria-label = "Close positive alert"
16+ >
17+ < SfIconClose class = "hidden md:block" />
18+ < SfIconClose size = "sm" class = "block md:hidden" />
19+ </ button >
20+ </ div >
21+ ) ;
22+ } ) ;
Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+ import { SfIconInfo } from 'qwik-storefront-ui' ;
3+
4+ export default component$ ( ( ) => {
5+ return (
6+ < div
7+ role = "alert"
8+ class = "flex items-center max-w-[600px] shadow-md bg-secondary-100 pr-2 pl-4 ring-1 ring-secondary-200 typography-text-sm md:typography-text-base py-1 rounded-md"
9+ >
10+ < SfIconInfo class = "mr-2 text-secondary-700 shrink-0" />
11+ < p class = "py-2" > Your cart will soon be full.</ p >
12+ </ div >
13+ ) ;
14+ } ) ;
Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+ import { SfIconWarning } from 'qwik-storefront-ui' ;
3+
4+ export default component$ ( ( ) => {
5+ return (
6+ < div
7+ role = "alert"
8+ class = "flex items-start max-w-[600px] shadow-md bg-warning-100 pr-2 pl-4 ring-1 ring-warning-200 typography-text-sm md:typography-text-base py-1 rounded-md"
9+ >
10+ < SfIconWarning class = "mt-2 mr-2 text-warning-700 shrink-0" />
11+ < div class = "py-2 mr-2" >
12+ < p class = "font-medium typography-text-base md:typography-text-lg" >
13+ Your account
14+ </ p >
15+ < p > Your shipping details need to be updated.</ p >
16+ </ div >
17+ < button
18+ type = "button"
19+ class = "py-1.5 px-3 md:py-2 md:px-4 rounded-md text-warning-700 hover:bg-warning-200 active:bg-warning-300 hover:text-warning-800 active:text-warning-900 ml-auto font-medium focus-visible:outline focus-visible:outline-offset"
20+ >
21+ Update
22+ </ button >
23+ </ div >
24+ ) ;
25+ } ) ;
You can’t perform that action at this time.
0 commit comments