Previews

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
render(Primer::Alpha::Overlay.new(
title: title,
subtitle: subtitle,
role: role,
size: size,
padding: padding,
anchor_align: anchor_align,
anchor_offset: anchor_offset,
anchor_side: anchor_side,
allow_out_of_bounds: allow_out_of_bounds,
visually_hide_title: visually_hide_title
)) do |d|
d.with_header(title: title, size: header_size)
if icon.present? && (icon != :none)
d.with_show_button(icon: icon, "aria-label": icon.to_s)
else
d.with_show_button { button_text }
end
d.with_body { body_text }
end