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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<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 class="Polaris-Spacer Polaris-Spacer--verticalSpacingBase"></div>
<div class="Polaris-FormLayout">
<div class="Polaris-FormLayout__Item">
<div class="polaris-text-field-wrapper">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text">Store name</label>
</div>
</div>
<div class="Polaris-Connected">
<div class="Polaris-Connected__Item Polaris-Connected__Item--primary">
<div data-polaris-text-field-has-value-class="Polaris-TextField--hasValue" data-polaris-text-field-clear-button-hidden-class="Polaris-TextField__Hidden" data-controller="polaris-text-field" class="Polaris-TextField">
<input type="text" id="" data-polaris-text-field-target="input" data-action="polaris-text-field#syncValue" class="Polaris-TextField__Input" />
<div class="Polaris-TextField__Backdrop"></div>
</div>
</div>
</div>
</div>
</div>
<div class="Polaris-FormLayout__Item">
<div class="polaris-text-field-wrapper">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text">Account email</label>
</div>
</div>
<div class="Polaris-Connected">
<div class="Polaris-Connected__Item Polaris-Connected__Item--primary">
<div data-polaris-text-field-has-value-class="Polaris-TextField--hasValue" data-polaris-text-field-clear-button-hidden-class="Polaris-TextField__Hidden" data-controller="polaris-text-field" class="Polaris-TextField">
<input type="text" id="" data-polaris-text-field-target="input" data-action="polaris-text-field#syncValue" class="Polaris-TextField__Input" />
<div class="Polaris-TextField__Backdrop"></div>
</div>
</div>
</div>
</div>
</div>
<div class="Polaris-FormLayout__Item">
<div class="polaris-text-field-wrapper">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text">Store name</label>
</div>
</div>
<div class="Polaris-Connected">
<div class="Polaris-Connected__Item Polaris-Connected__Item--primary">
<div data-polaris-text-field-has-value-class="Polaris-TextField--hasValue" data-polaris-text-field-clear-button-hidden-class="Polaris-TextField__Hidden" data-controller="polaris-text-field" class="Polaris-TextField">
<input type="text" id="" data-polaris-text-field-target="input" data-action="polaris-text-field#syncValue" class="Polaris-TextField__Input" />
<div class="Polaris-TextField__Backdrop"></div>
</div>
</div>
</div>
</div>
</div>
<div class="Polaris-FormLayout__Item">
<div class="polaris-text-field-wrapper">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label">
<label class="Polaris-Label__Text">Account email</label>
</div>
</div>
<div class="Polaris-Connected">
<div class="Polaris-Connected__Item Polaris-Connected__Item--primary">
<div data-polaris-text-field-has-value-class="Polaris-TextField--hasValue" data-polaris-text-field-clear-button-hidden-class="Polaris-TextField__Hidden" data-controller="polaris-text-field" class="Polaris-TextField">
<input type="text" id="" data-polaris-text-field-target="input" data-action="polaris-text-field#syncValue" class="Polaris-TextField__Input" />
<div class="Polaris-TextField__Backdrop"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</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="false" class="Polaris-Frame-ToastManager__ToastWrapper">
<div>
<div class="Polaris-Frame-Toast">
Message sent
<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
17
18
19
20
21
22
23
24
25
26
<%= polaris_frame do |frame| %>
<%= polaris_page(title: "Toast example") do %>
<%= polaris_button(data: {
controller: "polaris",
target: "#demo-toast",
action: "polaris#showToast",
}) { "Show toast" } %>
<%= polaris_spacer(vertical: :base) %>
<%= polaris_form_layout do |form_layout| %>
<% 2.times do %>
<% form_layout.with_item do %>
<%= polaris_text_field(label: "Store name") %>
<% end %>
<% form_layout.with_item do %>
<%= polaris_text_field(label: "Account email") %>
<% end %>
<% end %>
<% end %>
<% end %>
<% frame.with_toasts do %>
<%= polaris_toast(id: "demo-toast", hidden: true) { "Message sent" } %>
<% end %>
<% end %>