89 lines
1.8 KiB
Svelte
89 lines
1.8 KiB
Svelte
<script>
|
|
let { entry, onConfirm, onCancel } = $props();
|
|
</script>
|
|
|
|
<div class="overlay" role="dialog" aria-modal="true">
|
|
<div class="dialog">
|
|
<h2 class="title">Delete entry?</h2>
|
|
<p class="body">
|
|
<strong>{entry.location.cities.join(', ')}, {entry.location.country}</strong> — {entry.date.slice(0, 4)} will be permanently removed.
|
|
</p>
|
|
<div class="actions">
|
|
<button class="btn btn-cancel" onclick={onCancel}>Cancel</button>
|
|
<button class="btn btn-delete" onclick={onConfirm}>Delete</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0,0,0,0.4);
|
|
z-index: 200;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.dialog {
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: 14px;
|
|
padding: 28px 32px;
|
|
width: 360px;
|
|
box-shadow: 0 8px 32px rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.title {
|
|
font-size: 17px;
|
|
font-weight: 400;
|
|
color: var(--text-h);
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.body {
|
|
font-size: 14px;
|
|
font-weight: 300;
|
|
color: var(--text);
|
|
line-height: 1.6;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 8px;
|
|
}
|
|
|
|
.btn {
|
|
font-family: var(--sans);
|
|
font-size: 13px;
|
|
font-weight: 300;
|
|
padding: 8px 18px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border);
|
|
cursor: pointer;
|
|
transition: background 0.15s, color 0.15s, border-color 0.15s;
|
|
}
|
|
|
|
.btn-cancel {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
.btn-cancel:hover {
|
|
background: var(--bg-subtle);
|
|
color: var(--text-h);
|
|
}
|
|
|
|
.btn-delete {
|
|
background: #dc2626;
|
|
color: #fff;
|
|
border-color: #dc2626;
|
|
}
|
|
.btn-delete:hover {
|
|
background: #b91c1c;
|
|
border-color: #b91c1c;
|
|
}
|
|
</style>
|