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
<!-- With Subhead Actions -->
<div data-view-component="true" class="Subhead">
<div id="scLabel-vert" data-view-component="true" class="Subhead-heading Subhead-heading--large">File view</div>
<div id="scCaption-vert" data-view-component="true" class="Subhead-description">Change the way the file is viewed</div>
<div data-view-component="true" class="Subhead-actions"> <segmented-control>
<ul aria-labelledby="scLabel-vert" aria-describedby="scCaption-vert" role="list" data-view-component="true" class="SegmentedControl--medium SegmentedControl">
<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--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--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--invisible-noVisuals"> <span class="Button-content">
<span class="Button-label">Blame</span>
</span>
</button>
</li>
</ul>
</segmented-control>
</div>
</div>
<!-- With Label And Caption -->
<div data-view-component="true" class="d-flex flex-column">
<span id="scLabel-horiz" data-view-component="true">File view</span>
<segmented-control>
<ul aria-labelledby="scLabel-horiz" aria-describedby="scCaption-horiz" role="list" data-view-component="true" class="SegmentedControl--medium SegmentedControl">
<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--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--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--invisible-noVisuals"> <span class="Button-content">
<span class="Button-label">Blame</span>
</span>
</button>
</li>
</ul>
</segmented-control>
<span id="scCaption-horiz" data-view-component="true" class="text-small mt-1 color-fg-muted">Change the way the file is viewed</span>
</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
<%# With Subhead Actions %>
<%= render(Primer::Beta::Subhead.new) do |component| %>
<% component.with_heading(id: "scLabel-vert") { "File view" } %>
<% component.with_description(id: "scCaption-vert") { "Change the way the file is viewed" } %>
<% component.with_actions do %>
<%= render(Primer::Alpha::SegmentedControl.new("aria-labelledby": "scLabel-vert", "aria-describedby": "scCaption-vert")) do |component| %>
<% component.with_item(label: "Preview", selected: true) %>
<% component.with_item(label: "Raw") %>
<% component.with_item(label: "Blame") %>
<% end %>
<% end %>
<% end %>
<%# With Label And Caption %>
<%= render(Primer::Box.new(display: :flex, direction: :column)) do %>
<%= render(Primer::BaseComponent.new(tag: "span", id: "scLabel-horiz")) { "File view" } %>
<%= render(Primer::Alpha::SegmentedControl.new("aria-labelledby": "scLabel-horiz", "aria-describedby": "scCaption-horiz")) do |component| %>
<% component.with_item(label: "Preview", selected: true) %>
<% component.with_item(label: "Raw") %>
<% component.with_item(label: "Blame") %>
<% end %>
<%= render(Primer::Beta::Text.new(font_size: :small, mt: 1, color: :muted, id: "scCaption-horiz")) { "Change the way the file is viewed" } %>
<% end %>