x
1
2
3
4
5
6
7
8
9
10
<section class='gl-banner'> <div class='gl-banner-content'> <h1 class='gl-banner-title'></h1> <p>This banner uses the primary_action slot.</p> <button class="btn btn-md btn-confirm gl-button">I'm special</button> </div> <button class='gl-button gl-banner-close btn-sm btn-icon js-close btn-default btn-default-tertiary' type='button'> <svg class="s16 dismiss-icon" data-testid="close-icon"><use href="/assets/icons-be8ca3b37e0f9a5adb0ee8b20a3ae0e568a9b5ac85539f8eaa965b6f7b4b38a1.svg#close"></use></svg> </button></section>
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.