Previews

No matching results.

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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<div data-controller="polaris-frame" class="Polaris-Frame">
<div data-polaris-frame-target="navigationOverlay" data-action="click->polaris-frame#closeMenu"></div>
<main class="Polaris-Frame__Main">
<div class="Polaris-Frame__Content">
<div class="Polaris-Page">
<div style="--pc-box-border-color: transparent;--pc-box-border-style: solid;--pc-box-padding-block-end-xs: var(--p-space-4);--pc-box-padding-block-end-md: var(--p-space-5);--pc-box-padding-block-start-xs: var(--p-space-4);--pc-box-padding-block-start-md: var(--p-space-5);--pc-box-padding-inline-end-xs: var(--p-space-4);--pc-box-padding-inline-end-sm: var(--p-space-0);--pc-box-padding-inline-start-xs: var(--p-space-4);--pc-box-padding-inline-start-sm: var(--p-space-0);position: relative" class="Polaris-Box">
<div class="Polaris-Page-Header--mobileView Polaris-Page-Header--mediumTitle Polaris-Page-Header--noBreadcrumbs">
<div class="Polaris-Page-Header__Row">
<div class="Polaris-Page-Header__TitleWrapper">
<div class="Polaris-Header-Title__TitleAndSubtitleWrapper">
<h1 class="Polaris-Header-Title">Toast example</h1>
</div>
</div>
</div>
</div>
</div>
<div class="">
<button data-controller="polaris-button polaris" data-target="#demo-toast" data-action="polaris#showToast" type="button" class="Polaris-Button">
<span class="Polaris-Button__Content">
<div class="Polaris-Button__Text">
Show toast
</div>
</span>
</button>
</div>
</div>
</div>
</main>
</div>
<div class="Polaris-Frame-ToastManager">
<div id="demo-toast" data-controller="polaris-toast" data-polaris-toast-hidden-value="true" data-polaris-toast-has-action-value="true" class="Polaris-Frame-ToastManager__ToastWrapper">
<div>
<div class="Polaris-Frame-Toast">
Message sent
<div class="Polaris-Frame-Toast__Action">
<button type="button" data-controller="polaris-button" class="Polaris-Button Polaris-Button--monochrome Polaris-Button--plain">
<span class="Polaris-Button__Content">
<div class="Polaris-Button__Text">
Undo
</div>
</span>
</button>
</div>
<button
data-action="polaris-toast#close"
type="button"
class="Polaris-Frame-Toast__CloseButton"
>
<span class="Polaris-Icon">
<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="M12.72 13.78a.75.75 0 1 0 1.06-1.06l-2.72-2.72 2.72-2.72a.75.75 0 0 0-1.06-1.06l-2.72 2.72-2.72-2.72a.75.75 0 0 0-1.06 1.06l2.72 2.72-2.72 2.72a.75.75 0 1 0 1.06 1.06l2.72-2.72 2.72 2.72Z"></path></svg>
</span>
</button>
</div>
</div>
</div>
</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<%= polaris_frame do |frame| %>
<%= polaris_page(title: "Toast example") do %>
<%= polaris_button(data: {
controller: "polaris",
target: "#demo-toast",
action: "polaris#showToast",
}) { "Show toast" } %>
<% end %>
<% frame.with_toasts do %>
<%= polaris_toast(id: "demo-toast", hidden: true) do |toast| %>
<% toast.with_action { "Undo" } %>
Message sent
<% end %>
<% end %>
<% end %>