Skip to content

Commit 099080c

Browse files
committed
feat: add core components flash theme
1 parent 6e0e019 commit 099080c

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

assets/components/core-components.css

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,54 @@ table.table.table-zebra td {
166166
transform: translateY(-50%);
167167
}
168168
}
169+
170+
#flash-info,
171+
#flash-error {
172+
@apply fixed top-4 right-4 z-50 w-96;
173+
}
174+
175+
#flash-info .alert,
176+
#flash-error .alert {
177+
@apply bg-white rounded-lg shadow-lg border-l-4 p-4 w-full;
178+
@apply flex items-start justify-between gap-4;
179+
border: none;
180+
border-left: 4px solid;
181+
}
182+
183+
#flash-info .alert {
184+
@apply border-l-success-300;
185+
}
186+
187+
#flash-error .alert {
188+
@apply border-l-danger-300;
189+
}
190+
191+
#flash-error .alert svg {
192+
@apply text-danger-300;
193+
}
194+
195+
#flash-info .alert p:first-of-type,
196+
#flash-error .alert p:first-of-type {
197+
@apply font-bold text-neutrals-350 mb-1;
198+
}
199+
200+
#flash-info .alert p:last-of-type,
201+
#flash-error .alert p:last-of-type {
202+
@apply text-sm text-neutrals-300;
203+
margin-left: -1.75rem; /* Negative margin to pull message left - message is nested in wrapper with icon, can't modify HTML */
204+
}
205+
206+
#flash-info .alert svg,
207+
#flash-error .alert svg {
208+
@apply w-5 h-5 flex-shrink-0 mt-0.5;
209+
}
210+
211+
#flash-info .alert button,
212+
#flash-error .alert button {
213+
@apply text-gray-400 hover:text-gray-600 transition-colors duration-200 flex-shrink-0;
214+
}
215+
216+
#flash-info .alert button svg,
217+
N #flash-error .alert button svg {
218+
@apply w-5 h-5;
219+
}

0 commit comments

Comments
 (0)