Pages

x
1
2
3
4
5
6
7
8
9
10
11
12
<div class="flex gap-2 p-4 rounded-sm bg-accent-subdued" data-testid="banner-component">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke-width="1.5" viewbox="0 0 24 24" class="shrink-0 text-accent mt-0.5" aria-hidden="true">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 11.5v5m0-8.99.01-.011M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"></path>
</svg>
<div class="flex flex-col items-start gap-2">
<p class="text-lg leading-6 font-semibold">This is a Banner</p>
<p class="text-base leading-5">Body text.</p>
<button type="button" class="btn mt-2" data-testid="action-button">
Action
</button>
</div>
</div>
1
2
3
4
5
6
7
<%= anchor_banner(variant:) do |banner| %>
<% banner.with_title_content(title) %>
<% banner.with_body do %>
<%= anchor_text(body) %>
<% end %>
<% banner.with_button(button_text) %>
<% end %>
Param Description Input