.link fixes + Add Modal defaultData

This commit is contained in:
venashial
2022-06-19 21:27:20 -07:00
parent 49acfc496b
commit b3233cab71
4 changed files with 11 additions and 6 deletions

View File

@@ -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() {

View File

@@ -41,8 +41,8 @@
disabled={key !== data.key}
let:close
on:click={() => {
dispatch('deletion')
close()
dispatch('deletion')
}}>
<IconTrash />
{$t(`modal.deletion.${type}.action`)}

View File

@@ -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);