300px
x
150px
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
<sub-header data-view-component="true" class="SubHeader"> <div class="SubHeader-leftPane"> <div data-targets="sub-header.shownItemsOnExpandedFilter" data-view-component="true" class="SubHeader-filterContainer d-none d-sm-flex"> <primer-text-field class="FormControl width-full FormControl--fullWidth"> <label class="sr-only FormControl-label" for="filter"> Filter </label> <div class="FormControl-input-wrap FormControl-input-wrap--trailingAction FormControl-input-wrap--leadingVisual FormControl-input-width--medium"> <span class="FormControl-input-leadingVisualWrap"> <svg data-target="primer-text-field.leadingVisual" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search FormControl-input-leadingVisual"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </span> <input placeholder="Filter" data-target="primer-text-field.inputElement sub-header.filterInput" data-action=" input:sub-header#toggleFilterInputClearButton focus:sub-header#toggleFilterInputClearButton" aria-describedby="validation-3c617c4d-d8e3-40e4-9aa1-696aa669a047" class="FormControl-input FormControl-medium SubHeader-filterInput SubHeader-filterInput_hiddenClearButton" type="text" name="filter" id="filter" /> <button type="button" id="" class="FormControl-input-trailingAction" aria-label="Clear" data-action="click:primer-text-field#clearContents"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x-circle-fill"> <path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path> </svg> </button> </div> <div class="FormControl-inlineValidation" id="validation-3c617c4d-d8e3-40e4-9aa1-696aa669a047" hidden="hidden"> <span class="FormControl-inlineValidation--visual" data-target="primer-text-field.validationSuccessIcon" hidden><svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" data-view-component="true" class="octicon octicon-check-circle-fill"> <path d="M6 0a6 6 0 1 1 0 12A6 6 0 0 1 6 0Zm-.705 8.737L9.63 4.403 8.392 3.166 5.295 6.263l-1.7-1.702L2.356 5.8l2.938 2.938Z"></path> </svg></span> <span class=" FormControl-inlineValidation--visual" data-target="primer-text-field.validationErrorIcon"><svg aria-hidden="true" height="12" viewBox="0 0 12 12" version="1.1" width="12" data-view-component="true" class="octicon octicon-alert-fill"> <path d="M4.855.708c.5-.896 1.79-.896 2.29 0l4.675 8.351a1.312 1.312 0 0 1-1.146 1.954H1.33A1.313 1.313 0 0 1 .183 9.058ZM7 7V3H5v4Zm-1 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path> </svg></span> <span></span> </div> </primer-text-field> <button data-targets="sub-header.shownItemsOnExpandedFilter" data-action="click:sub-header#collapseFilterInput" type="button" data-view-component="true" class="Button--invisible Button--medium Button Button--invisible-noVisuals d-none"> <span class="Button-content"> <span class="Button-label">Cancel</span> </span> </button> </div> <button data-action="click:sub-header#expandFilterInput" data-targets="sub-header.hiddenItemsOnExpandedFilter" id="icon-button-5bbd968e-3a2d-411f-a7b8-b202180a1c90" aria-labelledby="tooltip-d8fb75be-8f4b-49b5-982b-5c2054d6a158" type="button" data-view-component="true" class="Button Button--iconOnly Button--secondary Button--medium d-inline-flex d-sm-none"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search Button-visual"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path> </svg> </button><tool-tip id="tooltip-d8fb75be-8f4b-49b5-982b-5c2054d6a158" for="icon-button-5bbd968e-3a2d-411f-a7b8-b202180a1c90" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Filter</tool-tip> <div data-targets="sub-header.hiddenItemsOnExpandedFilter" data-view-component="true"> <!-- Render any custom filter component that you want --> <button id="icon-button-33864b39-5dd6-4eb5-9168-34b46d4ad462" aria-labelledby="tooltip-b0bb804b-ad98-4a16-b30f-a9283e43cc53" type="button" data-view-component="true" class="Button Button--iconOnly Button--secondary Button--medium"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-filter Button-visual"> <path d="M.75 3h14.5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5ZM3 7.75A.75.75 0 0 1 3.75 7h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 3 7.75Zm3 4a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path> </svg> </button><tool-tip id="tooltip-b0bb804b-ad98-4a16-b30f-a9283e43cc53" for="icon-button-33864b39-5dd6-4eb5-9168-34b46d4ad462" popover="manual" data-direction="s" data-type="label" data-view-component="true" class="sr-only position-absolute">Filter</tool-tip> </div> </div> <div class="SubHeader-middlePane" data-targets="sub-header.hiddenItemsOnExpandedFilter"> </div> <div class="SubHeader-rightPane" data-targets="sub-header.hiddenItemsOnExpandedFilter"> </div> <div class="SubHeader-bottomPane"> <div data-view-component="true" class="mt-3"> <!-- Render any custom component that you want --> <!-- The component will be shown in a second row below the rest, spanning the whole width --> <div data-view-component="true" class="color-bg-accent p-3">Render any custom content here (e.g a filter area)</div> </div> </div></sub-header>
No notes provided.
1
2
3
4
5
6
7
8
9
10
11
12
<%= render(Primer::OpenProject::SubHeader.new) do |component| %> <% component.with_filter_input(name: "filter", label: "Filter") %> <% component.with_filter_component do %> <!-- Render any custom filter component that you want --> <%= render(Primer::Beta::IconButton.new(icon: "filter", "aria-label": "Filter")) %> <% end %> <% component.with_bottom_pane_component do %> <!-- Render any custom component that you want --> <!-- The component will be shown in a second row below the rest, spanning the whole width --> <%= render(Primer::BaseComponent.new(tag: :div, bg: :accent, p: 3)) { 'Render any custom content here (e.g a filter area)' } %> <% end %><% end %>
No params configured.