File tree Expand file tree Collapse file tree 6 files changed +106
-0
lines changed
apps/qwik-demo-app/src/routes/Button Expand file tree Collapse file tree 6 files changed +106
-0
lines changed Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+ import { SfButton } from 'qwik-storefront-ui' ;
3+
4+ export default component$ ( ( ) => {
5+ return (
6+ < div class = "flex flex-col items-center space-y-4 xs:block xs:space-x-4" >
7+ < SfButton as = "a" href = "/" >
8+ Link
9+ </ SfButton >
10+ </ div >
11+ ) ;
12+ } ) ;
Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+ import { SfButton } from 'qwik-storefront-ui' ;
3+
4+ export default component$ ( ( ) => {
5+ return (
6+ < SfButton type = "button" class = "w-full" >
7+ Hello
8+ </ SfButton >
9+ ) ;
10+ } ) ;
Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+ import {
3+ SfButton ,
4+ SfIconHome ,
5+ SfIconShoppingCart ,
6+ SfIconStar ,
7+ } from 'qwik-storefront-ui' ;
8+
9+ export default component$ ( ( ) => {
10+ return (
11+ < div class = "flex flex-col items-center space-y-4 xs:flex-row xs:space-y-0 xs:space-x-4" >
12+ < SfButton >
13+ < div q :slot = "prefix" >
14+ < SfIconHome />
15+ </ div >
16+ Home
17+ </ SfButton >
18+
19+ < SfButton >
20+ < div q :slot = "suffix" >
21+ < SfIconStar />
22+ </ div >
23+ Hello
24+ </ SfButton >
25+
26+ < SfButton type = "button" square aria-label = "Add to cart" >
27+ < SfIconShoppingCart />
28+ </ SfButton >
29+ </ div >
30+ ) ;
31+ } ) ;
Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+ import { SfButton } from 'qwik-storefront-ui' ;
3+
4+ export default component$ ( ( ) => {
5+ return (
6+ < div class = "flex flex-col items-center space-y-4 xs:block xs:space-x-4" >
7+ < SfButton type = "button" size = "sm" >
8+ Hello
9+ </ SfButton >
10+
11+ < SfButton type = "button" size = "base" >
12+ Hello
13+ </ SfButton >
14+
15+ < SfButton type = "button" size = "lg" >
16+ Hello
17+ </ SfButton >
18+ </ div >
19+ ) ;
20+ } ) ;
Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+ import { SfButton } from 'qwik-storefront-ui' ;
3+
4+ export default component$ ( ( ) => {
5+ return (
6+ < SfButton >
7+ < span class = "truncate max-w-[200px]" >
8+ { ' ' }
9+ Too long description for button{ ' ' }
10+ </ span >
11+ </ SfButton >
12+ ) ;
13+ } ) ;
Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+ import { SfButton } from 'qwik-storefront-ui' ;
3+
4+ export default component$ ( ( ) => {
5+ return (
6+ < div class = "flex flex-col items-center space-y-4 xs:block xs:space-x-4" >
7+ < SfButton type = "button" variant = "primary" >
8+ Hello
9+ </ SfButton >
10+
11+ < SfButton type = "button" variant = "secondary" >
12+ Hello
13+ </ SfButton >
14+
15+ < SfButton type = "button" variant = "tertiary" >
16+ Hello
17+ </ SfButton >
18+ </ div >
19+ ) ;
20+ } ) ;
You can’t perform that action at this time.
0 commit comments