Skip to content

Commit

Permalink
add(attribute): add test attrbute for hamburger button mobile (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm authored Oct 10, 2024
1 parent bf78373 commit 2625808
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/layouts/Topbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
{#if $$slots.controls}
{#if checkMobile()}
<Button
hook="button-show-controls"
appearance={Appearance.Alt}
icon
on:click={_ => {
Expand All @@ -46,17 +47,17 @@
</button>
<div
class="controls-dropdown"
data-cy="controls-dropdown"
role="button"
tabindex="0"
on:click={_ => {
showControls = false
}}
on:keydown={e => {
if (e.key === 'Enter' || e.key === ' ') {
if (e.key === "Enter" || e.key === " ") {
showControls = false
}
}}
>
}}>
<slot name="controls" />
</div>
{/if}
Expand Down

0 comments on commit 2625808

Please sign in to comment.