Skip to content

Commit

Permalink
Merge branch 'main' into fix-popover-open-selector-for-anchored-position
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan authored May 12, 2023
2 parents 247c163 + a1ca6fd commit 89640eb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-tomatoes-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/view-components': patch
---

Fix embedded example in SelectInput docs
5 changes: 5 additions & 0 deletions .changeset/funny-tomatoes-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/view-components': patch
---

Make ActionList leading visual icons the same color as the item text.
4 changes: 1 addition & 3 deletions app/components/primer/alpha/action_list/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ class Item < Primer::Component
#
# To render custom content, call the `with_leading_visual_content` method and pass a block that returns a string.
renders_one :leading_visual, types: {
icon: lambda { |**system_arguments|
Primer::Beta::Octicon.new(classes: "ActionListItem-visual ActionListItem-visual--leading", **system_arguments)
},
icon: Primer::Beta::Octicon,
avatar: ->(**kwargs) { Primer::Beta::Avatar.new(**{ **kwargs, size: 16 }) },
svg: lambda { |**system_arguments|
Primer::BaseComponent.new(tag: :svg, width: "16", height: "16", **system_arguments)
Expand Down
8 changes: 7 additions & 1 deletion lib/primer/yard/lookbook_pages_backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class LookbookPage
PREVIEW_MAP = {
Primer::Alpha::TextField => [:single_text_field_form, :multi_text_field_form],
Primer::Alpha::TextArea => [],
Primer::Alpha::Select => [:select_list_form],
Primer::Alpha::Select => [:select_form],
Primer::Alpha::MultiInput => [:multi_input_form],
Primer::Alpha::RadioButton => [:radio_button_with_nested_form],
Primer::Alpha::RadioButtonGroup => [:radio_button_group_form],
Expand Down Expand Up @@ -49,6 +49,12 @@ def generate

preview_methods = PREVIEW_MAP[component]
preview_erbs = preview_methods.map do |preview_method|
# rubocop:disable Style/IfUnlessModifier
if Primer::Forms::FormsPreview.instance_methods.exclude?(preview_method)
raise "Preview '#{preview_method}' does not exist in Primer::Forms::FormsPreview"
end
# rubocop:enable Style/IfUnlessModifier

"<%= embed Primer::Forms::FormsPreview, #{preview_method.inspect} %>"
end
# rubocop:enable Lint/UselessAssignment
Expand Down

0 comments on commit 89640eb

Please sign in to comment.