Skip to content

Commit

Permalink
updating slot use in BorderBox examples to the '.with_#{slot_name}' s…
Browse files Browse the repository at this point in the history
…yntax (#1290)

* updating all slot use in BorderBox to the '.with_#{slot_name}' syntax

* added changeset
  • Loading branch information
mxriverlynn authored Aug 9, 2022
1 parent 7da8c96 commit cc81b54
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/ninety-feet-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/view-components': patch
---

updating BorderBox slot use to the new `.with_#{slot_name}` syntax
26 changes: 13 additions & 13 deletions app/components/primer/beta/border_box.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,55 +72,55 @@ class BorderBox < Primer::Component

# @example Header with title, body, rows, and footer
# <%= render(Primer::Beta::BorderBox.new) do |component| %>
# <% component.header do |h| %>
# <% component.with_header do |h| %>
# <% h.title(tag: :h2) do %>
# Header
# <% end %>
# <% end %>
# <% component.body do %>
# <% component.with_body do %>
# Body
# <% end %>
# <% component.row do %>
# <% component.with_row do %>
# <% if true %>
# Row one
# <% end %>
# <% end %>
# <% component.row do %>
# <% component.with_row do %>
# Row two
# <% end %>
# <% component.footer do %>
# <% component.with_footer do %>
# Footer
# <% end %>
# <% end %>
#
# @example Padding density
# <%= render(Primer::Beta::BorderBox.new(padding: :condensed)) do |component| %>
# <% component.header do %>
# <% component.with_header do %>
# Header
# <% end %>
# <% component.body do %>
# <% component.with_body do %>
# Body
# <% end %>
# <% component.row do %>
# <% component.with_row do %>
# Row two
# <% end %>
# <% component.footer do %>
# <% component.with_footer do %>
# Footer
# <% end %>
# <% end %>
#
# @example Row colors
# <%= render(Primer::Beta::BorderBox.new) do |component| %>
# <% component.row do %>
# <% component.with_row do %>
# Default
# <% end %>
# <% component.row(scheme: :neutral) do %>
# <% component.with_row(scheme: :neutral) do %>
# Neutral
# <% end %>
# <% component.row(scheme: :info) do %>
# <% component.with_row(scheme: :info) do %>
# Info
# <% end %>
# <% component.row(scheme: :warning) do %>
# <% component.with_row(scheme: :warning) do %>
# Warning
# <% end %>
# <% end %>
Expand Down

0 comments on commit cc81b54

Please sign in to comment.