x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div class="flex flex-col gap-4 max-w-lg"> <div role="alert" aria-live="assertive" aria-atomic="true" class="relative w-full rounded-md border p-4 flex items-start gap-3 [&>i]:translate-y-0.5 [&>i]:shrink-0 bg-background text-foreground border-input"> <i data-lucide="badge-check" class="inline-block w-4 h-4 shrink-0" aria-hidden="true"></i> <div class="flex flex-col gap-1 min-w-0 flex-1"> <h5 class="font-medium leading-none tracking-tight">Custom icon</h5> <div class="text-sm leading-relaxed [&_p]:leading-relaxed">Uses a custom badge-check icon instead of default.</div> </div> </div> <div role="alert" aria-live="assertive" aria-atomic="true" class="relative w-full rounded-md border p-4 flex items-start gap-3 [&>i]:translate-y-0.5 [&>i]:shrink-0 bg-emerald-50 text-emerald-800 border-emerald-300 dark:bg-emerald-950/30 dark:text-emerald-200 dark:border-emerald-800"> <i data-lucide="circle-check" class="inline-block w-4 h-4 shrink-0 text-emerald-600" aria-hidden="true"></i> <div class="flex flex-col gap-1 min-w-0 flex-1"> <h5 class="font-medium leading-none tracking-tight">Custom colored icon</h5> <div class="text-sm leading-relaxed [&_p]:leading-relaxed">Icon color overridden via class prop.</div> </div> </div></div>1
2
3
4
5
6
7
8
9
10
11
12
<div class="flex flex-col gap-4 max-w-lg"> <%= render(UI::Alert.new) do |alert| %> <% alert.with_icon(name: "badge-check") %> <% alert.with_title { "Custom icon" } %> <% alert.with_description { "Uses a custom badge-check icon instead of default." } %> <% end %> <%= render(UI::Alert.new(variant: :success)) do |alert| %> <% alert.with_icon(name: "circle-check", class: "text-emerald-600") %> <% alert.with_title { "Custom colored icon" } %> <% alert.with_description { "Icon color overridden via class prop." } %> <% end %></div>No notes provided.
No params configured.