style: align modal close button across apps

This commit is contained in:
KodekaTeam committed 2026-06-21 23:08:11 +07:00
1 parent ad14f97d90
commit 7a66ed9578
30 files changed
+594 -541

No files matched your search

@@ -628,6 +628,15 @@ export default function ServerConfigModal({
return (
<div className="modal-overlay">
<div className="modal-shell" style={{ maxWidth: 920 }}>
<button
type="button"
onClick={onClose}
className="modal-close"
aria-label="Close server config modal"
>
<X size={22} />
</button>
<div
className="modal animate-slide-in"
style={{
@@ -946,7 +955,7 @@ export default function ServerConfigModal({
Refresh.
</p>
</div>
<div style={{ display: "flex", gap: 8 }}>
<div style={{ display: "flex", gap: 8, paddingRight: 36 }}>
<button
className="btn btn-ghost btn-sm"
onClick={() => void loadSnapshot()}
@@ -954,17 +963,6 @@ export default function ServerConfigModal({
>
<RefreshCw size={14} /> Refresh
</button>
<button
onClick={onClose}
style={{
background: "none",
border: "none",
cursor: "pointer",
color: "var(--text-muted)",
}}
>
<X size={18} />
</button>
</div>
</div>
@@ -1156,6 +1154,7 @@ export default function ServerConfigModal({
) : (
renderActiveTab()
)}
</div>
</div>
</div>
);
+19 -21
View File
@@ -92,20 +92,29 @@ export default function ServerFormModal({
return (
<div className="modal-overlay">
<div
className="modal animate-slide-in"
style={{
width: "100%",
maxWidth: 520,
padding: 28,
}}
>
<div className="modal-shell" style={{ maxWidth: 520 }}>
<button
type="button"
onClick={onClose}
className="modal-close"
aria-label={isEdit ? "Close edit server modal" : "Close add server modal"}
>
<X size={22} />
</button>
<div
className="modal animate-slide-in"
style={{
width: "100%",
maxWidth: 520,
padding: 28,
}}
>
<div
style={{
display: "flex",
justifyContent: "space-between",
alignItems: "center",
marginBottom: 20,
paddingRight: 36,
}}
>
<h3
@@ -117,18 +126,6 @@ export default function ServerFormModal({
>
{isEdit ? "Edit Server" : "Add Server"}
</h3>
<button
type="button"
onClick={onClose}
style={{
background: "none",
border: "none",
cursor: "pointer",
color: "var(--text-muted)",
}}
>
<X size={18} />
</button>
</div>
{error && (
<div
@@ -428,6 +425,7 @@ export default function ServerFormModal({
</button>
</div>
</form>
</div>
</div>
</div>
);
+23 -19
View File
@@ -458,22 +458,39 @@ export default function ServersPage() {
onClick={closeDeleteModal}
>
<div
className="card"
className="modal-shell"
style={{
width: "min(100%, 520px)",
padding: 0,
overflow: "hidden",
boxShadow: "0 28px 70px rgba(2, 6, 23, 0.46)",
maxWidth: 520,
}}
onClick={(event) => event.stopPropagation()}
>
{!confirmDeleteStep ? (
<button
type="button"
onClick={closeDeleteModal}
disabled={deleting !== null}
className="modal-close"
aria-label="Close delete server dialog"
>
<X size={22} />
</button>
) : null}
<div
className="card"
style={{
padding: 0,
overflow: "hidden",
boxShadow: "0 28px 70px rgba(2, 6, 23, 0.46)",
}}
>
{!confirmDeleteStep ? (
<div style={{ padding: 28, display: "grid", gap: 18 }}>
<div
style={{
display: "flex",
justifyContent: "space-between",
gap: 12,
paddingRight: 28,
}}
>
<div style={{ display: "grid", gap: 8 }}>
@@ -515,20 +532,6 @@ export default function ServersPage() {
server access assignments.
</p>
</div>
<button
onClick={closeDeleteModal}
disabled={deleting !== null}
style={{
background: "none",
border: "none",
cursor: deleting ? "not-allowed" : "pointer",
color: "var(--text-muted)",
alignSelf: "flex-start",
}}
aria-label="Close delete server dialog"
>
<X size={18} />
</button>
</div>
<div
@@ -646,6 +649,7 @@ export default function ServersPage() {
</div>
</div>
)}
</div>
</div>
</div>
) : null}