Skip to content

Commit 518f43d

Browse files
committed
docs(popover-examples): simplify inspect styles
1 parent f8204c0 commit 518f43d

File tree

1 file changed

+3
-33
lines changed
  • apps/website/src/routes/docs/headless/popover/examples

1 file changed

+3
-33
lines changed

apps/website/src/routes/docs/headless/popover/examples/inspect.tsx

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,13 @@
1-
import { component$, useStyles$ } from '@builder.io/qwik';
1+
import { component$ } from '@builder.io/qwik';
22
import { Popover, PopoverTrigger } from '@qwik-ui/headless';
33

44
export default component$(() => {
5-
useStyles$(`
6-
.my-animation.popover-showing {
7-
animation: popoverFadeIn 300ms ease;
8-
}
9-
10-
.my-animation.popover-closing {
11-
animation: popoverFadeOut 300ms ease;
12-
}
13-
14-
@keyframes popoverFadeIn
15-
from {
16-
opacity: 0;
17-
} to {
18-
opacity: 1;
19-
}
20-
21-
@keyframes popoverFadeOut
22-
from {
23-
opacity: 1;
24-
} to {
25-
opacity: 0;
26-
}
27-
`);
28-
295
return (
306
<>
31-
<PopoverTrigger
32-
popovertarget="inspect-id"
33-
class="rounded-base border-2 border-slate-300 bg-slate-800 px-3 py-1 text-white"
34-
>
7+
<PopoverTrigger popovertarget="inspect-id" class="popover-trigger">
358
Inspect the popover!
369
</PopoverTrigger>
37-
<Popover
38-
id="inspect-id"
39-
class="max-w-[20rem] rounded-base border-2 border-slate-300 bg-slate-800 p-4 shadow-md"
40-
>
10+
<Popover id="inspect-id" class="popover">
4111
<p class="leading-5">
4212
I'm in the <strong>:top-layer</strong> pseudo element on supported browsers like
4313
chrome.

0 commit comments

Comments
 (0)