x
1
2
3
4
5
6
7
8
9
10
11
<div class='gl-banner gl-card gl-pl-6 gl-pr-8 gl-py-6'> <div class='gl-card-body gl-flex !gl-p-0'> <div class='gl-banner-content'> <h2 class='gl-banner-title'></h2> <p>This banner uses the primary_action slot.</p> <button class="btn btn-md btn-confirm gl-button">I'm special</button> </div> </div> <button class="gl-button btn btn-icon btn-sm btn-default btn-default-tertiary js-close gl-banner-close" type="button"><svg class="s16 gl-icon gl-button-icon " data-testid="close-icon"><use href="/assets/icons-be8ca3b37e0f9a5adb0ee8b20a3ae0e568a9b5ac85539f8eaa965b6f7b4b38a1.svg#close"></use></svg> </button></div>
1
2
3
4
5
6
7
render(Pajamas::BannerComponent.new) do |c| c.with_primary_action do # You could also `render` another partial here. tag.button "I'm special", class: "btn btn-md btn-confirm gl-button" end content_tag :p, "This banner uses the primary_action slot."end
Use the primary_action
slot instead of button_text
and button_link
if you need something more special,
like rendering a partial that holds your button.
No params configured.