Skip to content

Commit

Permalink
upgrade button component in dialog (#1753)
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Rohan <[email protected]>
  • Loading branch information
keithamus and jonrohan authored Jan 6, 2023
1 parent 68112f3 commit 95df035
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-ghosts-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": patch
---

Update `with_show_button` slot to use `Primer::Beta::Button` instead of `Primer::ButtonComponent`.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions app/components/primer/alpha/dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ class Dialog < Primer::Component

# Optional button to open the dialog.
#
# @param system_arguments [Hash] The same arguments as <%= link_to_component(Primer::ButtonComponent) %>.
# @param system_arguments [Hash] The same arguments as <%= link_to_component(Primer::Beta::Button) %>.
renders_one :show_button, lambda { |**system_arguments|
system_arguments[:classes] = class_names(
system_arguments[:classes]
)
system_arguments[:id] = "dialog-show-#{@system_arguments[:id]}"
system_arguments[:data] = (system_arguments[:data] || {}).merge({ "show-dialog-id": @system_arguments[:id] })
Primer::ButtonComponent.new(**system_arguments)
Primer::Beta::Button.new(**system_arguments)
}

# Header content.
Expand Down

0 comments on commit 95df035

Please sign in to comment.