Skip to content

Commit

Permalink
fix(clipboard): fix storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
skhamvon committed Sep 28, 2023
1 parent 66ee69e commit d6f220e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ class OdsClipboardController {
}
}

checkForClickOutside(event: any): void {
if (this.component.el.contains(event.target) || this.component.surface === undefined || !this.component.surface.opened) {
checkForClickOutside(event: MouseEvent): void {
if (this.component.el.contains(event.target as Node) || this.component.surface === undefined || !this.component.surface.opened) {
return;
} else {
this.closeSurface();
}

this.closeSurface();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const TemplateDefault = (args:any) => {
return html`
<osds-clipboard ...=${getTagAttributes(args)} @keydown=${(e: KeyboardEvent) => e.stopPropagation()}>
Clipboard
<span slot='success-message'>Success</span>
<span slot='error-message'>Error</span>
</osds-clipboard>
`;
}
Expand Down

0 comments on commit d6f220e

Please sign in to comment.