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
<action-menu data-select-variant="none" data-view-component="true">
<focus-group direction="vertical" mnemonics retain>
<button id="action-menu-234e0b23-2e47-43f8-9ec2-8cb2b9076b9d-button" popovertarget="action-menu-234e0b23-2e47-43f8-9ec2-8cb2b9076b9d-overlay" aria-controls="action-menu-234e0b23-2e47-43f8-9ec2-8cb2b9076b9d-list" aria-haspopup="true" type="button" data-view-component="true" class="Button--secondary Button--medium Button"> <span class="Button-content">
<span class="Button-label">Menu</span>
</span>
</button>
<anchored-position id="action-menu-234e0b23-2e47-43f8-9ec2-8cb2b9076b9d-overlay" anchor="action-menu-234e0b23-2e47-43f8-9ec2-8cb2b9076b9d-button" align="start" side="outside-bottom" anchor-offset="normal" popover="auto" data-view-component="true">
<div data-view-component="true" class="Overlay Overlay--size-auto">
<div data-view-component="true" class="Overlay-body Overlay-body--paddingNone"> <action-list>
<div data-view-component="true">
<ul aria-labelledby="action-menu-234e0b23-2e47-43f8-9ec2-8cb2b9076b9d-button" id="action-menu-234e0b23-2e47-43f8-9ec2-8cb2b9076b9d-list" role="menu" data-view-component="true" class="ActionListWrap--inset ActionListWrap">
<li value="" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem">
<button tabindex="-1" id="item-18329aea-c353-41f7-987d-ca2212c8e261" role="menuitem" data-view-component="true" class="ActionListContent">
<span data-view-component="true" class="ActionListItem-label">
Item
</span>
</button>
</li>
<li value="" data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem--danger ActionListItem">
<button tabindex="-1" data-show-dialog-id="my-dialog" id="item-69cd19d3-cd16-4282-b185-9fe997532482" role="menuitem" data-view-component="true" class="ActionListContent">
<span data-view-component="true" class="ActionListItem-label">
Show dialog
</span>
</button>
</li>
</ul>
</div>
</action-list>
</div>
</div>
</anchored-position> </focus-group>
</action-menu>
<dialog-helper>
<dialog id="my-dialog" aria-modal="true" aria-labelledby="my-dialog-title" aria-describedby="my-dialog-description" data-view-component="true" class="Overlay Overlay-whenNarrow Overlay--size-medium Overlay--motion-scaleFade Overlay--disableScroll">
<div data-view-component="true" class="Overlay-header">
<div class="Overlay-headerContentWrap">
<div class="Overlay-titleWrap">
<h1 class="Overlay-title " id="my-dialog-title">
Confirm deletion
</h1>
</div>
<div class="Overlay-actionWrap">
<button data-close-dialog-id="my-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
<path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>
</svg></button>
</div>
</div>
</div>
<div data-view-component="true" class="Overlay-body">
Are you sure you want to delete this?
</div>
<div data-view-component="true" class="Overlay-footer Overlay-footer--alignEnd">
<button data-close-dialog-id="my-dialog" type="button" data-view-component="true" class="Button--secondary Button--medium Button"> <span class="Button-content">
<span class="Button-label">Cancel</span>
</span>
</button>
<button type="button" data-view-component="true" class="Button--danger Button--medium Button"> <span class="Button-content">
<span class="Button-label">Delete</span>
</span>
</button>
</div>
</dialog></dialog-helper>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<%= render(Primer::Alpha::ActionMenu.new) do |component| %>
<% component.with_show_button { "Menu" } %>
<% component.with_item(label: "Item", tag: :button, value: "") %>
<% component.with_item(
label: "Show dialog",
tag: :button,
content_arguments: { "data-show-dialog-id": "my-dialog" },
value: "",
scheme: :danger
) %>
<% end %>
<%= render(Primer::Alpha::Dialog.new(id: "my-dialog", title: "Confirm deletion")) do |d| %>
<%= render(Primer::Alpha::Dialog::Body.new()) do %>
Are you sure you want to delete this?
<% end %>
<%= render(Primer::Alpha::Dialog::Footer.new()) do %>
<%= render(Primer::Beta::Button.new(data: { "close-dialog-id": "my-dialog" })) { "Cancel" } %>
<%= render(Primer::Beta::Button.new(scheme: :danger)) { "Delete" } %>
<% end %>
<% end %>

No assets to display.