PR Feedback
This commit is contained in:
parent
50336c80e3
commit
e74d4b4ddb
|
@ -19,12 +19,12 @@
|
||||||
export let active = false
|
export let active = false
|
||||||
|
|
||||||
const handleOnClick = async () => {
|
const handleOnClick = async () => {
|
||||||
if (handlingOnClick) {
|
handlingOnClick = true
|
||||||
return
|
|
||||||
|
if (onClick) {
|
||||||
|
await onClick()
|
||||||
}
|
}
|
||||||
|
|
||||||
handlingOnClick = true
|
|
||||||
await onClick()
|
|
||||||
handlingOnClick = false
|
handlingOnClick = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<button
|
<button
|
||||||
class={`spectrum-Button spectrum-Button--size${size} spectrum-Button--${type}`}
|
class={`spectrum-Button spectrum-Button--size${size} spectrum-Button--${type}`}
|
||||||
class:spectrum-Button--quiet={quiet}
|
class:spectrum-Button--quiet={quiet}
|
||||||
{disabled}
|
disabled={disabled || handlingOnClick}
|
||||||
use:styleable={$component.styles}
|
use:styleable={$component.styles}
|
||||||
on:click={handleOnClick}
|
on:click={handleOnClick}
|
||||||
contenteditable={$component.editing && !icon}
|
contenteditable={$component.editing && !icon}
|
||||||
|
|
Loading…
Reference in New Issue