File tree Expand file tree Collapse file tree 8 files changed +88
-0
lines changed Expand file tree Collapse file tree 8 files changed +88
-0
lines changed Original file line number Diff line number Diff line change 1+ import { component$ , HTMLAttributes , Slot } from '@builder.io/qwik' ;
2+ import { ButtonGroup as HeadlessButtonGroup } from '@qwik-ui/headless' ;
3+
4+ export type ButtonGroupProps = HTMLAttributes < HTMLElement > ;
5+
6+ export const ButtonGroup = component$ (
7+ ( props : ButtonGroupProps ) => {
8+ return (
9+ < HeadlessButtonGroup { ...props } class = "btn-group" >
10+ < Slot />
11+ </ HeadlessButtonGroup >
12+ ) ;
13+ }
14+ ) ;
Original file line number Diff line number Diff line change 11export * from './components/button/button' ;
2+ export * from './components/button-group/button-group' ;
23export * from './components/collapse/collapse' ;
34export * from './components/drawer/drawer' ;
45export * from './components/tabs' ;
Original file line number Diff line number Diff line change 1+ import { component$ , HTMLAttributes , Slot } from '@builder.io/qwik' ;
2+
3+ export type ButtonGroupProps = HTMLAttributes < HTMLElement > ;
4+
5+ export const ButtonGroup = component$ (
6+ ( props : ButtonGroupProps ) => {
7+ return (
8+ < div { ...props } >
9+ < Slot />
10+ </ div >
11+ ) ;
12+ }
13+ ) ;
Original file line number Diff line number Diff line change 11export * from './components/button/button' ;
2+ export * from './components/button-group/button-group' ;
23export * from './components/collapse/collapse' ;
34export * from './components/drawer' ;
45export * from './components/tabs/tabs' ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import styles from './menu.css?inline';
44
55export const generateMenu = ( library : string ) => [
66 { label : 'Button' , path : `/docs/${ library . toLowerCase ( ) } /button` } ,
7+ { label : 'ButtonGroup' , path : `/docs/${ library . toLowerCase ( ) } /button-group` } ,
78 { label : 'Collapse' , path : `/docs/${ library . toLowerCase ( ) } /collapse` } ,
89 { label : 'Drawer' , path : `/docs/${ library . toLowerCase ( ) } /drawer` } ,
910 { label : 'Select' , path : `/docs/${ library . toLowerCase ( ) } /select` } ,
Original file line number Diff line number Diff line change 1+ import { component$ } from '@builder.io/qwik' ;
2+ import { Button , ButtonGroup } from '@qwik-ui/theme-daisy' ;
3+
4+ export default component$ ( ( ) => {
5+ return (
6+ < >
7+ < h2 > This is the documentation for the ButtonGroup</ h2 >
8+
9+ < h1 > Basic Example</ h1 >
10+ < ButtonGroup >
11+ < Button > BUTTON 1</ Button >
12+ < Button > BUTTON 2</ Button >
13+ < Button > BUTTON 3</ Button >
14+ </ ButtonGroup >
15+
16+ < hr />
17+ < h1 > With custom styles</ h1 >
18+ < ButtonGroup style = "border: 0.2rem solid black; padding: 1rem;" >
19+ < Button > BUTTON 1</ Button >
20+ < Button > BUTTON 2</ Button >
21+ < Button > BUTTON 3</ Button >
22+ </ ButtonGroup >
23+ </ >
24+ ) ;
25+ } ) ;
Original file line number Diff line number Diff line change 1+ .custom-btn-group {
2+ display : inline-flex;
3+ padding : 1rem ;
4+ gap : 3rem ;
5+ }
Original file line number Diff line number Diff line change 1+ import { component$ , useStyles$ } from '@builder.io/qwik' ;
2+ import { Button , ButtonGroup } from '@qwik-ui/headless' ;
3+ import styles from './button-group.css?inline' ;
4+
5+ export default component$ ( ( ) => {
6+ useStyles$ ( styles ) ;
7+
8+ return (
9+ < >
10+ < h2 > This is the documentation for the ButtonGroup</ h2 >
11+
12+ < h1 > Basic Example</ h1 >
13+ < ButtonGroup >
14+ < Button > BUTTON 1</ Button >
15+ < Button > BUTTON 2</ Button >
16+ < Button > BUTTON 3</ Button >
17+ </ ButtonGroup >
18+
19+ < hr />
20+ < h1 > With custom styles</ h1 >
21+ < ButtonGroup class = "custom-btn-group" style = "border: 2px solid black" >
22+ < Button > BUTTON 1</ Button >
23+ < Button > BUTTON 2</ Button >
24+ < Button > BUTTON 3</ Button >
25+ </ ButtonGroup >
26+ </ >
27+ ) ;
28+ } ) ;
You can’t perform that action at this time.
0 commit comments