Pages

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<div class="border border-subdued" data-testid="panel-component">
<div class="border-subdued px-6 py-4 border-b" data-testid="panel-header">
<p class="text-sm leading-4 font-bold uppercase">My Panel</p>
</div>
<div class="p-6" data-testid="panel-body">
Panel with footer and supporting text
</div>
<div class="border-t border-subdued flex items-center pt-4 pb-6 mx-6" data-testid="panel-footer">
<span class="text-base text-primary font-semibold">1 of 2</span>
<div class="ml-auto" data-testid="panel-actions">
<button type="submit" class="btn-small btn btn-primary" data-testid="save-button" form="example">
Save
</button>
</div>
</div>
</div>
1
2
3
4
5
6
7
8
9
10
anchor_panel(active: true) do |component|
component.with_header_content("My Panel")
component.with_body_content("Panel with footer and supporting text")
component.with_footer do |footer|
footer.with_supporting_text_content("1 of 2")
footer.with_primary_action(form: "example", label: "Save")
end
end