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 1
1
import { component$ } from '@builder.io/qwik' ;
2
2
import { Popover , usePopover } from '@qwik-ui/headless' ;
3
-
3
+ import { Button } from '@qwik-ui/styled' ;
4
4
export default component$ ( ( ) => {
5
5
const { togglePopover } = usePopover ( `programmatic-id` ) ;
6
6
return (
7
7
< >
8
- < button
8
+ < Button
9
9
preventdefault :click
10
- class = "rounded-base border-2 border-slate-400 bg-slate-800 px-3 py-1 text-white"
11
10
onKeyDown$ = { ( e ) => {
12
11
if ( e . key === 'o' ) {
13
12
togglePopover ( ) ;
14
13
}
15
14
} }
16
15
>
17
16
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" >
23
19
I was programmatically opened!
24
20
</ Popover >
25
21
</ >
You can’t perform that action at this time.
0 commit comments