refactor: explicit type for buttons

This commit is contained in:
Scott
2024-04-30 11:33:08 -04:00
parent a606b34a19
commit 12a9aec319
2 changed files with 2 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ const {
} = Astro.props;
---
<button class={className} aria-label={label} data-aw-toggle-menu>
<button type="button" class={className} aria-label={label} data-aw-toggle-menu>
<span class="sr-only">{label}</span>
<slot>
<span

View File

@@ -92,7 +92,7 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`;
<li class={links?.length ? 'dropdown' : ''}>
{links?.length ? (
<>
<button class="hover:text-link dark:hover:text-white px-4 py-3 flex items-center">
<button type="button" class="hover:text-link dark:hover:text-white px-4 py-3 flex items-center">
{text}{' '}
<Icon name="tabler:chevron-down" class="w-3.5 h-3.5 ml-0.5 rtl:ml-0 rtl:mr-0.5 hidden md:inline" />
</button>