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`)}
|
||||
|
||||
@@ -11,12 +11,14 @@
|
||||
}
|
||||
|
||||
.link-group {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, auto);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
|
||||
.link {
|
||||
color: var(--color-text);
|
||||
margin-right: 1rem;
|
||||
|
||||
&:hover {
|
||||
color: var(--color-link);
|
||||
|
||||
Reference in New Issue
Block a user