x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<div class="Polaris-LegacyCard"> <div class="Polaris-LegacyCard__Header"> <h2 class="Polaris-Text--root Polaris-Text--headingMd Polaris-Text--semibold"> Customer </h2> </div> <div class="Polaris-LegacyCard__Section"> <p>John Smith</p> </div> <div class="Polaris-LegacyCard__Section"> <div class="Polaris-LegacyCard__SectionHeader"> <div class="Polaris-LegacyStack Polaris-LegacyStack--alignmentTrailing"> <div class="Polaris-LegacyStack__Item Polaris-LegacyStack__Item--fill"> <h3 class="Polaris-Text--root Polaris-Text--headingSm Polaris-Text--semibold"> Contact information </h3> </div> <div class="Polaris-LegacyStack__Item"> <div class="Polaris-ButtonGroup"> <div class="Polaris-ButtonGroup__Item Polaris-ButtonGroup__Item--plain"><a content="Delete" href="https://bao.agency" data-controller="polaris-button" class="Polaris-Button Polaris-Button--destructive Polaris-Button--plain"> <span class="Polaris-Button__Content"> <div class="Polaris-Button__Text"> Delete </div> </span> </a></div> <div class="Polaris-ButtonGroup__Item Polaris-ButtonGroup__Item--plain"><a content="Edit" href="https://bao.agency" data-controller="polaris-button" class="Polaris-Button Polaris-Button--plain"> <span class="Polaris-Button__Content"> <div class="Polaris-Button__Text"> Edit </div> </span> </a></div> </div> </div> </div> </div> <p>john.smith@example.com</p> </div></div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<%= polaris_card(title: "Customer") do |card| %> <% card.with_section do %> <p>John Smith</p> <% end %> <% card.with_section( title: "Contact information", actions: [ { content: "Delete", url: "https://bao.agency", destructive: true }, { content: "Edit", url: "https://bao.agency" } ] ) do %> <p>john.smith@example.com</p> <% end %><% end %>
Use when a card action applies only to one section and will delete merchant data or be otherwise difficult to recover from.
No params configured.