fix buttons missing type="button"
Triggers unintentional form submits if missing `type` property.
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
/>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
{id}
|
||||
class={[
|
||||
'text-sui-text flex size-7 appearance-none items-center',
|
||||
|
||||
@@ -219,6 +219,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="close"
|
||||
class="absolute top-4 right-4 inline-flex cursor-pointer items-center
|
||||
justify-center disabled:cursor-not-allowed disabled:opacity-50"
|
||||
|
||||
@@ -334,6 +334,7 @@
|
||||
<!-- Back button -->
|
||||
{#if backButtonVisible}
|
||||
<button
|
||||
type="button"
|
||||
class="text-sui-text hover:text-sui-text-700 dark:text-sui-background dark:hover:text-sui-background/80 flex cursor-pointer items-center
|
||||
gap-2.5 font-medium transition-colors"
|
||||
onclick={() => (index -= 1)}
|
||||
|
||||
@@ -93,6 +93,7 @@
|
||||
{#each pages as page, i (page.title)}
|
||||
{@const active = activeIndex === i}
|
||||
<button
|
||||
type="button"
|
||||
bind:this={refs[i]}
|
||||
class={['-mb-[2px] cursor-pointer px-2']}
|
||||
onclick={() => {
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
{/if}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
bind:this={ref}
|
||||
{...others}
|
||||
class={[
|
||||
|
||||
Reference in New Issue
Block a user