Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<div class="p-8 space-y-6">
<h2 class="text-2xl font-bold mb-6">With Title</h2>
<div class="space-y-4">
<div data-controller="better-ui--action-messages" class="rounded-lg p-4 relative bg-info-50 border border-info-200 text-info-900">
<div class="font-semibold mb-2 text-info-900">
Info
</div>
<div class="flex gap-3">
<ul class="list-none list-inside space-y-1 flex-1">
<li class="text-sm">This is a info message with a title.</li>
<li class="text-sm">The title appears above the message list.</li>
</ul>
</div>
</div>
<div data-controller="better-ui--action-messages" class="rounded-lg p-4 relative bg-success-50 border border-success-200 text-success-900">
<div class="font-semibold mb-2 text-success-900">
Success
</div>
<div class="flex gap-3">
<ul class="list-none list-inside space-y-1 flex-1">
<li class="text-sm">This is a success message with a title.</li>
<li class="text-sm">The title appears above the message list.</li>
</ul>
</div>
</div>
<div data-controller="better-ui--action-messages" class="rounded-lg p-4 relative bg-warning-50 border border-warning-200 text-warning-900">
<div class="font-semibold mb-2 text-warning-900">
Warning
</div>
<div class="flex gap-3">
<ul class="list-none list-inside space-y-1 flex-1">
<li class="text-sm">This is a warning message with a title.</li>
<li class="text-sm">The title appears above the message list.</li>
</ul>
</div>
</div>
<div data-controller="better-ui--action-messages" class="rounded-lg p-4 relative bg-danger-50 border border-danger-200 text-danger-900">
<div class="font-semibold mb-2 text-danger-900">
Danger
</div>
<div class="flex gap-3">
<ul class="list-none list-inside space-y-1 flex-1">
<li class="text-sm">This is a danger message with a title.</li>
<li class="text-sm">The title appears above the message list.</li>
</ul>
</div>
</div>
</div>
</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div class="p-8 space-y-6">
<h2 class="text-2xl font-bold mb-6">With Title</h2>
<div class="space-y-4">
<% (@variants || [:info, :success, :warning, :danger]).each do |variant| %>
<%= render BetterUi::ActionMessagesComponent.new(
variant: variant,
style: :soft,
title: variant.to_s.capitalize,
messages: [
"This is a #{variant} message with a title.",
"The title appears above the message list."
]
) %>
<% end %>
</div>
</div>