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
<action-menu data-select-variant="none" data-view-component="true"> <focus-group direction="vertical" mnemonics retain> <button title="foo" id="action-menu-111e23d3-c5fc-4f91-8d33-aafd9dbb6bde-button" popovertarget="action-menu-111e23d3-c5fc-4f91-8d33-aafd9dbb6bde-overlay" aria-label="foo" aria-controls="action-menu-111e23d3-c5fc-4f91-8d33-aafd9dbb6bde-list" aria-haspopup="true" type="button" data-view-component="true" class="__hl_background_meeting_status_open Button--secondary Button--medium Button"> <span class="Button-content"> <span class="Button-visual Button-leadingVisual"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-unlock"> <path d="M5.5 4v2h7A1.5 1.5 0 0 1 14 7.5v6a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 13.5v-6A1.5 1.5 0 0 1 3.499 6H4V4a4 4 0 0 1 7.371-2.154.75.75 0 0 1-1.264.808A2.5 2.5 0 0 0 5.5 4Zm-2 3.5v6h9v-6h-9Z"></path> </svg> </span> <span class="Button-label">Open</span> </span> <span class="Button-visual Button-trailingAction"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path> </svg> </span> </button> <anchored-position data-target="action-menu.overlay" id="action-menu-111e23d3-c5fc-4f91-8d33-aafd9dbb6bde-overlay" anchor="action-menu-111e23d3-c5fc-4f91-8d33-aafd9dbb6bde-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-111e23d3-c5fc-4f91-8d33-aafd9dbb6bde-button" id="action-menu-111e23d3-c5fc-4f91-8d33-aafd9dbb6bde-list" role="menu" data-view-component="true" class="ActionListWrap--inset ActionListWrap"> <li data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-36ae300e-90d1-4d17-b481-6f5b124886b7" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16 ActionListContent--blockDescription"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-unlock"> <path d="M5.5 4v2h7A1.5 1.5 0 0 1 14 7.5v6a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 13.5v-6A1.5 1.5 0 0 1 3.499 6H4V4a4 4 0 0 1 7.371-2.154.75.75 0 0 1-1.264.808A2.5 2.5 0 0 0 5.5 4Zm-2 3.5v6h9v-6h-9Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-descriptionWrap"> <span data-view-component="true" class="ActionListItem-label"> <span data-view-component="true">Open</span> </span> <span data-view-component="true" class="ActionListItem-description">The status is open</span> </span></button> </li> <li data-targets="action-list.items" role="none" data-view-component="true" class="ActionListItem"> <button tabindex="-1" id="item-6ddd3161-ff96-49c5-a977-7dda9023a299" type="button" role="menuitem" data-view-component="true" class="ActionListContent ActionListContent--visual16 ActionListContent--blockDescription"> <span class="ActionListItem-visual ActionListItem-visual--leading"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-lock"> <path d="M4 4a4 4 0 0 1 8 0v2h.25c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 12.25 15h-8.5A1.75 1.75 0 0 1 2 13.25v-5.5C2 6.784 2.784 6 3.75 6H4Zm8.25 3.5h-8.5a.25.25 0 0 0-.25.25v5.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25ZM10.5 6V4a2.5 2.5 0 1 0-5 0v2Z"></path> </svg> </span> <span data-view-component="true" class="ActionListItem-descriptionWrap"> <span data-view-component="true" class="ActionListItem-label"> <span data-view-component="true">Closed</span> </span> <span data-view-component="true" class="ActionListItem-description">The status is closed</span> </span></button> </li> </ul> </div> </action-list> </div> </div> </anchored-position> </focus-group></action-menu>
See the component documentation for more details.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
status = OpPrimer::StatusButtonOption.new(name: "Open", color_ref: :open, color_namespace: :meeting_status, icon: :unlock, description: "The status is open")items = [ status, OpPrimer::StatusButtonOption.new(name: "Closed", color_ref: :closed, color_namespace: :meeting_status, icon: :lock, description: "The status is closed")]component = OpPrimer::StatusButtonComponent.new(current_status: status, items: items, readonly: false, button_arguments: { size:, title: "foo" })render(component)
No params configured.