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
<!-- Size small -->
<segmented-control>
<ul aria-label="File view" role="list" data-view-component="true" class="SegmentedControl--small SegmentedControl SegmentedControl--fullWidth">
<li class="SegmentedControl-item SegmentedControl-item--selected" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" aria-current="true" type="button" data-view-component="true" class="Button--invisible Button--small Button Button--fullWidth Button--invisible-noVisuals"> <span class="Button-content">
<span class="Button-label">Preview</span>
</span>
</button>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" aria-current="false" type="button" data-view-component="true" class="Button--invisible Button--small Button Button--fullWidth Button--invisible-noVisuals"> <span class="Button-content">
<span class="Button-label">Raw</span>
</span>
</button>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" aria-current="false" type="button" data-view-component="true" class="Button--invisible Button--small Button Button--fullWidth Button--invisible-noVisuals"> <span class="Button-content">
<span class="Button-label">Blame</span>
</span>
</button>
</li>
</ul>
</segmented-control>
<!-- Size medium -->
<segmented-control>
<ul aria-label="File view" role="list" data-view-component="true" class="SegmentedControl--medium SegmentedControl SegmentedControl--fullWidth">
<li class="SegmentedControl-item SegmentedControl-item--selected" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" aria-current="true" type="button" data-view-component="true" class="Button--invisible Button--medium Button Button--fullWidth Button--invisible-noVisuals"> <span class="Button-content">
<span class="Button-label">Preview</span>
</span>
</button>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" aria-current="false" type="button" data-view-component="true" class="Button--invisible Button--medium Button Button--fullWidth Button--invisible-noVisuals"> <span class="Button-content">
<span class="Button-label">Raw</span>
</span>
</button>
</li>
<li class="SegmentedControl-item" role="listitem" data-targets="segmented-control.items">
<button data-action="click:segmented-control#select" aria-current="false" type="button" data-view-component="true" class="Button--invisible Button--medium Button Button--fullWidth Button--invisible-noVisuals"> <span class="Button-content">
<span class="Button-label">Blame</span>
</span>
</button>
</li>
</ul>
</segmented-control>
1
2
3
4
5
6
7
8
9
10
11
12
13
# Size small
render(Primer::Alpha::SegmentedControl.new("aria-label": "File view", hide_labels: hide_labels, full_width: true, size: :small)) do |component|
component.with_item(label: "Preview", selected: true)
component.with_item(label: "Raw")
component.with_item(label: "Blame")
end
# Size medium
render(Primer::Alpha::SegmentedControl.new("aria-label": "File view", hide_labels: hide_labels, full_width: true, size: :medium)) do |component|
component.with_item(label: "Preview", selected: true)
component.with_item(label: "Raw")
component.with_item(label: "Blame")
end
Param Description Input