Skip to content

Commit 93ee5f0

Browse files
author
Pavel Fokin
committed
Update dialog styles
1 parent 8ee4582 commit 93ee5f0

File tree

2 files changed

+36
-47
lines changed

2 files changed

+36
-47
lines changed

components/Admin/notifications/ChannelCard/ChannelDeleteDialog.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,24 @@ export default function ChannelDeleteDialog({ isOpen, onClose, onDelete }) {
66
isOpen={isOpen}
77
onClose={onClose}
88
title="Delete channel"
9+
size="small"
910
>
10-
<div className="text-gray-600 dark:text-gray-400 mb-4">
11+
<div className="text-gray-600 dark:text-gray-400 mb-6">
1112
Are you sure you want to delete this channel? This action cannot be undone.
1213
</div>
13-
<div className="flex justify-end gap-2">
14-
<button className="btn btn-secondary" onClick={onClose}>
14+
<div className="flex justify-end gap-3">
15+
<button
16+
className="btn btn-secondary"
17+
onClick={onClose}
18+
type="button"
19+
>
1520
Cancel
1621
</button>
17-
<button className="btn btn-error" onClick={onDelete}>
22+
<button
23+
className="btn btn-error"
24+
onClick={onDelete}
25+
type="button"
26+
>
1827
Delete
1928
</button>
2029
</div>

styles/components/dialog.module.scss

Lines changed: 23 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44
left: 0;
55
right: 0;
66
bottom: 0;
7-
background-color: rgba(0, 0, 0, 0.5);
7+
background-color: rgba(0, 0, 0, 0.6);
88
display: flex;
99
align-items: center;
1010
justify-content: center;
11-
z-index: 1000;
11+
z-index: 9999;
1212
padding: 1rem;
1313
animation: fadeIn 0.2s ease-out;
1414
}
1515

1616
.dialog {
17-
background: white;
18-
border-radius: 8px;
19-
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
17+
background: var(--card-bg);
18+
color: var(--card-text);
19+
border: 2px solid var(--card-border);
20+
box-shadow: 4px 4px 0px var(--card-shadow);
21+
border-radius: 4px;
2022
max-width: 90vw;
2123
max-height: 90vh;
2224
overflow: hidden;
@@ -31,31 +33,31 @@
3133
}
3234

3335
.medium {
34-
width: 600px;
36+
width: 500px;
3537
}
3638

3739
.large {
38-
width: 800px;
40+
width: 700px;
3941
}
4042

4143
.xlarge {
42-
width: 1000px;
44+
width: 900px;
4345
}
4446

4547
.header {
4648
display: flex;
4749
align-items: center;
4850
justify-content: space-between;
49-
padding: 1.5rem 1.5rem 0 1.5rem;
50-
border-bottom: 1px solid #e5e7eb;
51+
padding: 1.25rem 1.25rem 0 1.25rem;
52+
border-bottom: 1px solid var(--card-border);
5153
margin-bottom: 1rem;
5254
}
5355

5456
.title {
5557
margin: 0;
56-
font-size: 1.25rem;
58+
font-size: 1.125rem;
5759
font-weight: 600;
58-
color: #111827;
60+
color: var(--card-text);
5961
flex: 1;
6062
}
6163

@@ -65,26 +67,26 @@
6567
cursor: pointer;
6668
padding: 0.5rem;
6769
border-radius: 4px;
68-
color: #6b7280;
70+
color: var(--text-secondary);
6971
transition: all 0.2s ease;
7072
display: flex;
7173
align-items: center;
7274
justify-content: center;
7375
margin-left: 0.5rem;
7476

7577
&:hover {
76-
background-color: #f3f4f6;
77-
color: #374151;
78+
background-color: var(--background-secondary);
79+
color: var(--text-main);
7880
}
7981

8082
&:focus {
81-
outline: 2px solid #3b82f6;
83+
outline: 2px solid var(--accent-link);
8284
outline-offset: 2px;
8385
}
8486
}
8587

8688
.content {
87-
padding: 0 1.5rem 1.5rem 1.5rem;
89+
padding: 0 1.25rem 1.25rem 1.25rem;
8890
overflow-y: auto;
8991
flex: 1;
9092
}
@@ -102,7 +104,7 @@
102104
@keyframes slideIn {
103105
from {
104106
opacity: 0;
105-
transform: scale(0.95) translateY(-10px);
107+
transform: scale(0.95) translateY(-20px);
106108
}
107109
to {
108110
opacity: 1;
@@ -120,6 +122,7 @@
120122
width: 100%;
121123
max-width: 100%;
122124
max-height: 95vh;
125+
margin: 0.5rem;
123126
}
124127

125128
.small,
@@ -138,31 +141,8 @@
138141
}
139142

140143
.title {
141-
font-size: 1.125rem;
144+
font-size: 1rem;
142145
}
143146
}
144147

145-
// Dark mode support (if your app supports it)
146-
@media (prefers-color-scheme: dark) {
147-
.dialog {
148-
background: #1f2937;
149-
color: #f9fafb;
150-
}
151-
152-
.header {
153-
border-bottom-color: #374151;
154-
}
155-
156-
.title {
157-
color: #f9fafb;
158-
}
159-
160-
.closeButton {
161-
color: #9ca3af;
162-
163-
&:hover {
164-
background-color: #374151;
165-
color: #d1d5db;
166-
}
167-
}
168-
}
148+

0 commit comments

Comments
 (0)