PR Feedback

This commit is contained in:
Gerard Burns 2023-04-27 14:17:09 +01:00
parent 50336c80e3
commit e74d4b4ddb
1 changed files with 5 additions and 5 deletions

View File

@ -19,12 +19,12 @@
export let active = false
const handleOnClick = async () => {
if (handlingOnClick) {
return
handlingOnClick = true
if (onClick) {
await onClick()
}
handlingOnClick = true
await onClick()
handlingOnClick = false
}
@ -49,7 +49,7 @@
<button
class={`spectrum-Button spectrum-Button--size${size} spectrum-Button--${type}`}
class:spectrum-Button--quiet={quiet}
{disabled}
disabled={disabled || handlingOnClick}
use:styleable={$component.styles}
on:click={handleOnClick}
contenteditable={$component.editing && !icon}