Skip to content

Commit e73597a

Browse files
committed
refactor: toast, use classes instead of ids
1 parent 0f062cf commit e73597a

1 file changed

Lines changed: 13 additions & 39 deletions

File tree

assets/components/core-components.css

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -167,82 +167,56 @@ table.table.table-zebra td {
167167
}
168168
}
169169

170-
#flash-info,
171-
#flash-error,
172-
#client-error,
173-
#server-error {
170+
.toast.toast-top.toast-end {
174171
@apply fixed top-4 right-4 z-50 w-96;
175172
}
176173

177-
#flash-info .alert,
178-
#flash-error .alert,
179-
#client-error .alert,
180-
#server-error .alert {
174+
.toast .alert {
181175
@apply bg-white rounded-lg shadow-lg border-l-4 p-4 w-full;
182176
@apply flex items-start justify-between gap-4;
183177
border: none;
184178
border-left: 4px solid;
185179
}
186180

187-
#flash-info .alert {
181+
.toast .alert-info {
188182
@apply border-l-success-300;
189183
}
190184

191-
#flash-error .alert,
192-
#client-error .alert,
193-
#server-error .alert {
185+
.toast .alert-error {
194186
@apply border-l-danger-300;
195187
}
196188

197-
#flash-error .alert svg,
198-
#client-error .alert svg,
199-
#server-error .alert svg {
189+
.toast .alert-error svg {
200190
@apply text-danger-300;
201191
}
202192

203-
#flash-info .alert p:first-of-type,
204-
#flash-error .alert p:first-of-type,
205-
#client-error .alert p:first-of-type,
206-
#server-error .alert p:first-of-type {
193+
.toast .alert p:first-of-type {
207194
@apply font-bold text-neutrals-350 mb-1;
208195
word-wrap: break-word;
209196
overflow-wrap: break-word;
210197
word-break: break-word;
211198
}
212-
#flash-info .alert p:last-of-type,
213-
#flash-error .alert p:last-of-type,
214-
#client-error .alert p:last-of-type,
215-
#server-error .alert p:last-of-type {
199+
200+
.toast .alert p:last-of-type {
216201
@apply text-sm text-neutrals-300;
217202
word-wrap: break-word;
218203
overflow-wrap: break-word;
219204
word-break: break-word;
220205
}
221206

222-
#flash-info .alert svg,
223-
#flash-error .alert svg,
224-
#client-error .alert svg,
225-
#server-error .alert svg {
207+
.toast .alert svg {
226208
@apply w-5 h-5 flex-shrink-0 mt-0.5;
227209
}
228210

229-
#flash-info .alert button,
230-
#flash-error .alert button,
231-
#client-error .alert button,
232-
#server-error .alert button {
211+
.toast .alert button {
233212
@apply text-gray-400 hover:text-gray-600 transition-colors duration-200 flex-shrink-0;
234213
}
235214

236-
#flash-info .alert button svg,
237-
#flash-error .alert button svg,
238-
#client-error .alert button svg,
239-
#server-error .alert button svg {
215+
.toast .alert button svg {
240216
@apply w-5 h-5;
241217
}
242218

243-
#flash-info .alert span.hero-information-circle,
244-
#flash-error .alert span.hero-exclamation-circle,
245-
#client-error .alert span.hero-exclamation-circle,
246-
#server-error .alert span.hero-exclamation-circle {
219+
.toast .alert span.hero-information-circle,
220+
.toast .alert span.hero-exclamation-circle {
247221
display: none !important;
248222
}

0 commit comments

Comments
 (0)