-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a slot to Overlay for a filter (#2651)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cameron Dutro <[email protected]> Co-authored-by: Katie Langerman <[email protected]> Co-authored-by: Isaac Shalom <[email protected]> Co-authored-by: thesnowrose <[email protected]> Co-authored-by: primer-css <[email protected]> Co-authored-by: Tyler Benning <[email protected]> Co-authored-by: tbenning <[email protected]> Co-authored-by: Keith Cirkel <[email protected]> Co-authored-by: langermank <[email protected]> Co-authored-by: camertron <[email protected]> Co-authored-by: jonrohan <[email protected]> Co-authored-by: Orhan Toy <[email protected]> Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com> Co-authored-by: primer[bot] <119360173+primer[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: primer[bot] <primer[bot]@users.noreply.github.com>
- Loading branch information
1 parent
507a743
commit e1f3434
Showing
8 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/view-components": minor | ||
--- | ||
|
||
Add a slot to `Overlay::Header` called `filter` for a filter input. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ | |
</div> | ||
<% end %> | ||
</div> | ||
<%= filter %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
previews/primer/alpha/overlay_preview/overlay_with_header_filter.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<%= render(Primer::Alpha::Overlay.new(title: "Dialog", role: :dialog, size: :large, padding: :condensed)) do |d| %> | ||
<% d.with_header(title: "Large Dialog Header", divider: true) do |header| %> | ||
<% header.with_filter do %> | ||
<%= render Primer::Alpha::TextField.new( | ||
autofocus: true, | ||
visually_hide_label: | ||
true, | ||
name: "filter", | ||
label: "Filter Overlay" | ||
) %> | ||
<% end %> | ||
<% end %> | ||
<% d.with_show_button { "Show Overlay" } %> | ||
<% d.with_footer { "Large Dialog Footer" } %> | ||
<% d.with_body { "This is a long body for the overlay dialog. <br>".html_safe * 20 } %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters