-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update IconButton and Button tooltips to be sibling instead of child (#…
…1265) * wrapping the icon_button with a span * Also wrapping button component * Create honest-pants-matter.md * wrong system argument
- Loading branch information
Showing
4 changed files
with
23 additions
and
8 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": patch | ||
--- | ||
|
||
Update IconButton and Button tooltips to be sibling instead of child |
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 |
---|---|---|
@@ -1,4 +1,12 @@ | ||
<%= render Primer::Beta::BaseButton.new(**@system_arguments) do -%> | ||
<%= leading_visual %><%= trimmed_content %><%= trailing_visual %><%= primer_octicon("triangle-down", ml: 2, mr: -1) if @dropdown %> | ||
<%= tooltip %> | ||
<% end -%> | ||
<% if tooltip.present? %> | ||
<%= render Primer::BaseComponent.new(tag: :div, position: :relative, display: :inline_block) do %> | ||
<%= render Primer::Beta::BaseButton.new(**@system_arguments) do -%> | ||
<%= leading_visual %><%= trimmed_content %><%= trailing_visual %><%= primer_octicon("triangle-down", ml: 2, mr: -1) if @dropdown %> | ||
<% end -%> | ||
<%= tooltip %> | ||
<% end -%> | ||
<% else %> | ||
<%= render Primer::Beta::BaseButton.new(**@system_arguments) do -%> | ||
<%= leading_visual %><%= trimmed_content %><%= trailing_visual %><%= primer_octicon("triangle-down", ml: 2, mr: -1) if @dropdown %> | ||
<% end -%> | ||
<% end %> |
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
<%= render Primer::BaseComponent.new(tag: :div, position: :relative, display: :inline_block) do %> | ||
<%= render Primer::Beta::BaseButton.new(**@system_arguments) do -%> | ||
<%= render Primer::OcticonComponent.new(icon: @icon) %> | ||
<% end -%> | ||
<%= render Primer::Alpha::Tooltip.new(**@tooltip_arguments) %> | ||
<% end %> |