Skip to content

Commit 7713ed1

Browse files
committed
fix(dialog): resolve lint-error concerning scope
1 parent f320e0c commit 7713ed1

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

packages/kit-headless/src/components/dialog/dialog.close.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
import { $, Slot, component$, useContext, useOn } from '@builder.io/qwik';
1+
import { Slot, component$, useContext } from '@builder.io/qwik';
22
import { dialogContext } from './dialog.context';
33

44
export const Close = component$(() => {
55
const context = useContext(dialogContext);
66

7-
useOn(
8-
'click',
9-
$(() => context.close$())
10-
);
11-
127
return (
13-
<section>
8+
<section onClick$={context.close$}>
149
<Slot />
1510
</section>
1611
);

packages/kit-headless/src/components/dialog/dialog.trigger.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
import { $, Slot, component$, useContext, useOn } from '@builder.io/qwik';
1+
import { Slot, component$, useContext } from '@builder.io/qwik';
22
import { dialogContext } from './dialog.context';
33

44
export const Trigger = component$(() => {
55
const context = useContext(dialogContext);
66

7-
useOn(
8-
'click',
9-
$(() => context.open$())
10-
);
11-
127
return (
13-
<section>
8+
<section onClick$={context.open$}>
149
<Slot />
1510
</section>
1611
);

0 commit comments

Comments
 (0)