Skip to content

Commit 45bcbf2

Browse files
committed
Separate buttons from footer, footer only has hint
1 parent 368ae1c commit 45bcbf2

1 file changed

Lines changed: 35 additions & 31 deletions

File tree

src/lib/components/ConfirmationModal.svelte

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,18 @@
6565
<p id="confirmation-message">{state.options.message}</p>
6666
</div>
6767

68-
<div class="dialog-footer">
69-
<span class="hint">Press <kbd>↵</kbd> to confirm</span>
68+
<div class="dialog-actions">
7069
<button class="ghost" onclick={handleCancel}>
7170
{state.options.cancelText}
7271
</button>
7372
<button onclick={handleConfirm}>
7473
{state.options.confirmText}
7574
</button>
7675
</div>
76+
77+
<div class="dialog-footer">
78+
Press <kbd>↵</kbd> to confirm
79+
</div>
7780
</div>
7881
</div>
7982
{/if}
@@ -98,35 +101,14 @@
98101
line-height: 1.5;
99102
}
100103
101-
.dialog-footer {
104+
.dialog-actions {
102105
display: flex;
103-
align-items: center;
106+
justify-content: flex-end;
104107
gap: var(--space-sm);
105-
padding: var(--space-xs) var(--space-md);
106-
background: var(--surface-raised);
107-
border-top: 1px solid var(--border);
108-
border-radius: 0 0 var(--radius-lg) var(--radius-lg);
109-
}
110-
111-
.dialog-footer .hint {
112-
font-size: 10px;
113-
color: var(--text-disabled);
114-
margin-right: auto;
115-
}
116-
117-
.dialog-footer kbd {
118-
display: inline-block;
119-
padding: 1px 4px;
120-
font-family: inherit;
121-
font-size: 9px;
122-
background: var(--surface);
123-
border: 1px solid var(--border);
124-
border-radius: 3px;
125-
color: var(--text-muted);
126-
margin: 0 2px;
108+
padding: var(--space-sm) var(--space-md);
127109
}
128110
129-
.dialog-footer button {
111+
.dialog-actions button {
130112
padding: var(--space-sm) var(--space-md);
131113
border: 1px solid var(--border);
132114
border-radius: var(--radius-md);
@@ -136,24 +118,46 @@
136118
transition: all var(--transition-fast);
137119
}
138120
139-
.dialog-footer button.ghost {
121+
.dialog-actions button.ghost {
140122
background: transparent;
141123
color: var(--text-muted);
142124
}
143125
144-
.dialog-footer button.ghost:hover {
126+
.dialog-actions button.ghost:hover {
145127
background: var(--surface-hover);
146128
color: var(--text);
147129
border-color: var(--border-focus);
148130
}
149131
150-
.dialog-footer button:not(.ghost) {
132+
.dialog-actions button:not(.ghost) {
151133
background: var(--surface-raised);
152134
color: var(--text);
153135
}
154136
155-
.dialog-footer button:not(.ghost):hover {
137+
.dialog-actions button:not(.ghost):hover {
156138
background: var(--surface-hover);
157139
border-color: var(--border-focus);
158140
}
141+
142+
.dialog-footer {
143+
padding: var(--space-xs) var(--space-md);
144+
background: var(--surface-raised);
145+
border-top: 1px solid var(--border);
146+
border-radius: 0 0 var(--radius-lg) var(--radius-lg);
147+
font-size: 10px;
148+
color: var(--text-disabled);
149+
text-align: center;
150+
}
151+
152+
.dialog-footer kbd {
153+
display: inline-block;
154+
padding: 1px 4px;
155+
font-family: inherit;
156+
font-size: 9px;
157+
background: var(--surface);
158+
border: 1px solid var(--border);
159+
border-radius: 3px;
160+
color: var(--text-muted);
161+
margin: 0 2px;
162+
}
159163
</style>

0 commit comments

Comments
 (0)