Skip to content

Commit

Permalink
add ts-expect-error blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdholt committed Aug 28, 2024
1 parent 4e43b65 commit 9bcb26c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web-components/src/button/button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,5 @@ export const Popover: Story<FluentButton> = renderComponent(html<StoryArgs<Fluen
<fluent-button popovertarget="foo" popovertargetaction="show">Show Popover</fluent-button>
<fluent-button popovertarget="foo" popovertargetaction="hide">Hide Popover</fluent-button>
<fluent-button popovertarget="foo" popovertargetaction="toggle">Toggle Popover</fluent-button>
<div id="foo" popover open>This is a popover</div>
<div id="foo" popover>This is a popover</div>
`);
3 changes: 3 additions & 0 deletions packages/web-components/src/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,16 @@ export class BaseButton extends FASTElement {
if (this.popoverTargetElement && !!this.popoverTargetElement.hasAttribute('popover')) {
switch (this.popovertargetaction) {
case 'hide':
// @ts-expect-error - Baseline 2024
this.popoverTargetElement?.hidePopover();
break;
case 'show':
// @ts-expect-error - Baseline 2024
this.popoverTargetElement?.showPopover();
break;
case 'toggle':
default:
// @ts-expect-error - Baseline 2024
this.popoverTargetElement?.togglePopover(!this.popoverOpen);
break;
}
Expand Down

0 comments on commit 9bcb26c

Please sign in to comment.