Previews

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
# Direction e
render(Primer::Alpha::Dropdown.new(display: :inline_block)) do |component|
component.with_button { "Dropdown" }
component.with_menu(direction: :e) do |menu|
menu.with_item { "Item 1" }
menu.with_item { "Item 2" }
menu.with_item { "Item 3" }
end
end
# Direction ne
render(Primer::Alpha::Dropdown.new(display: :inline_block)) do |component|
component.with_button { "Dropdown" }
component.with_menu(direction: :ne) do |menu|
menu.with_item { "Item 1" }
menu.with_item { "Item 2" }
menu.with_item { "Item 3" }
end
end
# Direction s
render(Primer::Alpha::Dropdown.new(display: :inline_block)) do |component|
component.with_button { "Dropdown" }
component.with_menu(direction: :s) do |menu|
menu.with_item { "Item 1" }
menu.with_item { "Item 2" }
menu.with_item { "Item 3" }
end
end
# Direction se
render(Primer::Alpha::Dropdown.new(display: :inline_block)) do |component|
component.with_button { "Dropdown" }
component.with_menu(direction: :se) do |menu|
menu.with_item { "Item 1" }
menu.with_item { "Item 2" }
menu.with_item { "Item 3" }
end
end
# Direction sw
render(Primer::Alpha::Dropdown.new(display: :inline_block)) do |component|
component.with_button { "Dropdown" }
component.with_menu(direction: :sw) do |menu|
menu.with_item { "Item 1" }
menu.with_item { "Item 2" }
menu.with_item { "Item 3" }
end
end
# Direction w
render(Primer::Alpha::Dropdown.new(display: :inline_block)) do |component|
component.with_button { "Dropdown" }
component.with_menu(direction: :w) do |menu|
menu.with_item { "Item 1" }
menu.with_item { "Item 2" }
menu.with_item { "Item 3" }
end
end