Skip to content

Commit d3e7557

Browse files
committed
feat(components): dialog component
1 parent 5f0e6c5 commit d3e7557

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/components/src/dialog/dialog.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {html, nothing} from 'lit/html.js';
1111
import {gecutButton} from '../button/button.js';
1212
import {divider} from '../divider/divider.js';
1313
import {icon} from '../icon/icon.js';
14-
import {iconButton} from '../icon-button/icon-button.js';
14+
import {gecutIconButton} from '../icon-button/icon-button.js';
1515

1616
import type {BasicDialog, DialogContent, DialogSignals} from './_type';
1717

@@ -109,8 +109,10 @@ export class GecutDialogDirective extends GecutDirective {
109109
110110
<div class="flex w-full gap-2 items-center">
111111
${when(!hasIcon && !hasButtons, () =>
112-
iconButton({
113-
onClick: this.close(content, 'cancel').bind(this),
112+
gecutIconButton({
113+
events: {
114+
click: this.close(content, 'cancel').bind(this),
115+
},
114116
// eslint-disable-next-line max-len
115117
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M368 368L144 144m224 0L144 368"/></svg>',
116118
}),
@@ -150,7 +152,9 @@ export class GecutDialogDirective extends GecutDirective {
150152
return gecutButton({
151153
...buttonContent,
152154
153-
onClick: this.close(content, buttonContent.value),
155+
events: {
156+
click: this.close(content, buttonContent.value),
157+
},
154158
});
155159
})}
156160
</div>

0 commit comments

Comments
 (0)