x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<div class='gl-alert gl-alert-info gl-alert-has-title' role='alert'>
<div class='gl-alert-icon-container'>
<svg class="s16 gl-alert-icon" data-testid="information-o-icon"><use href="/assets/icons-be8ca3b37e0f9a5adb0ee8b20a3ae0e568a9b5ac85539f8eaa965b6f7b4b38a1.svg#information-o"></use></svg>
</div>
<button class="gl-button btn btn-icon btn-sm btn-default btn-default-tertiary js-close gl-dismiss-btn " aria-label="Dismiss" 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 class='gl-alert-content' role='alert'>
<h2 class='gl-alert-title'>
Alert title (optional)
</h2>
<div class='gl-alert-body'>
Alert message goes here.
</div>
</div>
</div>
1
2
3
4
5
6
7
8
9
10
", body: "Alert message goes here.", dismissible: true, variant: :info)
render(Pajamas::AlertComponent.new(
title: title,
dismissible: dismissible,
variant: variant.to_sym
)) do |c|
if body
c.with_body { body }
end
end
Param Description Input