File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
apps/website/src/routes/docs/headless/popover/examples Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 11import { component$ } from '@builder.io/qwik' ;
22import { Popover , usePopover } from '@qwik-ui/headless' ;
3-
3+ import { Button } from '@qwik-ui/styled' ;
44export default component$ ( ( ) => {
55 const { togglePopover } = usePopover ( `programmatic-id` ) ;
66 return (
77 < >
8- < button
8+ < Button
99 preventdefault :click
10- class = "rounded-base border-2 border-slate-400 bg-slate-800 px-3 py-1 text-white"
1110 onKeyDown$ = { ( e ) => {
1211 if ( e . key === 'o' ) {
1312 togglePopover ( ) ;
1413 }
1514 } }
1615 >
1716 Focus me and press the 'o' key!
18- </ button >
19- < Popover
20- id = "programmatic-id"
21- class = "rounded-base border-2 border-slate-300 bg-slate-800 px-3 py-1 opacity-0 shadow-md"
22- >
17+ </ Button >
18+ < Popover id = "programmatic-id" class = "popover" >
2319 I was programmatically opened!
2420 </ Popover >
2521 </ >
You can’t perform that action at this time.
0 commit comments