You've already forked AstralRinth
forked from didirus/AstralRinth
.link fixes + Add Modal defaultData
This commit is contained in:
@@ -14,11 +14,12 @@
|
||||
/** If enabled, clicking outside the modal with close it */
|
||||
export let dismissable = true
|
||||
|
||||
export let data: Record<string, any> = {}
|
||||
export let defaultData: Record<string, any> = {}
|
||||
export let data: Record<string, any> = defaultData
|
||||
|
||||
function close() {
|
||||
open = false
|
||||
data = {}
|
||||
data = defaultData
|
||||
}
|
||||
|
||||
function trigger() {
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
disabled={key !== data.key}
|
||||
let:close
|
||||
on:click={() => {
|
||||
dispatch('deletion')
|
||||
close()
|
||||
dispatch('deletion')
|
||||
}}>
|
||||
<IconTrash />
|
||||
{$t(`modal.deletion.${type}.action`)}
|
||||
|
||||
Reference in New Issue
Block a user