[ui] DomiUi: @domi/ui v1.4.0: Water and Touch her are Button again (the handler fix from here), the credit is DomiCredit link={false}
This commit is contained in:
@@ -56,6 +56,9 @@
|
||||
disabled = false,
|
||||
type = 'button',
|
||||
children,
|
||||
// Taken out of rest, so the button can run them before its own (a spread before the attribute would lose them).
|
||||
onkeydown: passedKeydown,
|
||||
onblur: passedBlur,
|
||||
...rest
|
||||
}: Props = $props();
|
||||
|
||||
@@ -133,8 +136,14 @@
|
||||
aria-label={iconOnly ? (armed ? confirm : label) : undefined}
|
||||
title={iconOnly ? (armed ? confirm : label) : undefined}
|
||||
onclick={press}
|
||||
onkeydown={(e) => e.key === 'Escape' && armed && disarm()}
|
||||
onblur={disarm}
|
||||
onkeydown={(e) => {
|
||||
passedKeydown?.(e);
|
||||
if (e.key === 'Escape' && armed) disarm();
|
||||
}}
|
||||
onblur={(e) => {
|
||||
passedBlur?.(e);
|
||||
disarm();
|
||||
}}
|
||||
use:strike
|
||||
>
|
||||
<span class="domi-btn__label">
|
||||
|
||||
Reference in New Issue
Block a user