primer_view_components 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -1
  3. data/app/components/primer/avatar_component.rb +11 -11
  4. data/app/components/primer/base_component.rb +55 -7
  5. data/app/components/primer/blankslate_component.html.erb +1 -1
  6. data/app/components/primer/blankslate_component.rb +6 -6
  7. data/app/components/primer/border_box_component.html.erb +5 -5
  8. data/app/components/primer/border_box_component.rb +34 -34
  9. data/app/components/primer/box_component.rb +5 -5
  10. data/app/components/primer/breadcrumb_component.html.erb +2 -2
  11. data/app/components/primer/breadcrumb_component.rb +12 -12
  12. data/app/components/primer/button_component.rb +9 -9
  13. data/app/components/primer/counter_component.rb +9 -9
  14. data/app/components/primer/details_component.html.erb +1 -1
  15. data/app/components/primer/details_component.rb +15 -15
  16. data/app/components/primer/dropdown_menu_component.html.erb +1 -1
  17. data/app/components/primer/dropdown_menu_component.rb +6 -6
  18. data/app/components/primer/flash_component.html.erb +2 -2
  19. data/app/components/primer/flash_component.rb +13 -13
  20. data/app/components/primer/flex_component.rb +5 -5
  21. data/app/components/primer/flex_item_component.rb +5 -5
  22. data/app/components/primer/heading_component.rb +4 -4
  23. data/app/components/primer/label_component.rb +9 -9
  24. data/app/components/primer/layout_component.html.erb +1 -1
  25. data/app/components/primer/layout_component.rb +6 -6
  26. data/app/components/primer/link_component.rb +8 -8
  27. data/app/components/primer/octicon_component.rb +10 -10
  28. data/app/components/primer/popover_component.html.erb +1 -1
  29. data/app/components/primer/popover_component.rb +26 -26
  30. data/app/components/primer/progress_bar_component.html.erb +2 -2
  31. data/app/components/primer/progress_bar_component.rb +14 -14
  32. data/app/components/primer/spinner_component.html.erb +1 -1
  33. data/app/components/primer/spinner_component.rb +9 -9
  34. data/app/components/primer/state_component.rb +8 -8
  35. data/app/components/primer/subhead_component.html.erb +4 -4
  36. data/app/components/primer/subhead_component.rb +26 -26
  37. data/app/components/primer/text_component.rb +5 -5
  38. data/app/components/primer/timeline_item_component.html.erb +4 -4
  39. data/app/components/primer/timeline_item_component.rb +28 -28
  40. data/app/components/primer/underline_nav_component.html.erb +1 -1
  41. data/app/components/primer/underline_nav_component.rb +5 -5
  42. data/lib/primer/classify.rb +2 -4
  43. data/lib/primer/view_components/version.rb +1 -1
  44. metadata +2 -2
@@ -1,4 +1,4 @@
1
- <%= render Primer::BaseComponent.new(**@kwargs) do %>
1
+ <%= render Primer::BaseComponent.new(**@system_arguments) do %>
2
2
  <%= render summary.component do %>
3
3
  <%= summary.content %>
4
4
  <% end %>
@@ -19,11 +19,11 @@ module Primer
19
19
  with_slot :body, class_name: "Body"
20
20
  with_slot :summary, class_name: "Summary"
21
21
 
22
- def initialize(overlay: NO_OVERLAY, reset: false, **kwargs)
23
- @kwargs = kwargs
24
- @kwargs[:tag] = :details
25
- @kwargs[:classes] = class_names(
26
- kwargs[:classes],
22
+ def initialize(overlay: NO_OVERLAY, reset: false, **system_arguments)
23
+ @system_arguments = system_arguments
24
+ @system_arguments[:tag] = :details
25
+ @system_arguments[:classes] = class_names(
26
+ system_arguments[:classes],
27
27
  OVERLAY_MAPPINGS[fetch_or_fallback(OVERLAY_MAPPINGS.keys, overlay, NO_OVERLAY)],
28
28
  "details-reset" => reset
29
29
  )
@@ -34,29 +34,29 @@ module Primer
34
34
  end
35
35
 
36
36
  class Summary < Primer::Slot
37
- def initialize(button: true, **kwargs)
37
+ def initialize(button: true, **system_arguments)
38
38
  @button = button
39
39
 
40
- @kwargs = kwargs
41
- @kwargs[:tag] = :summary
42
- @kwargs[:role] = "button"
40
+ @system_arguments = system_arguments
41
+ @system_arguments[:tag] = :summary
42
+ @system_arguments[:role] = "button"
43
43
  end
44
44
 
45
45
  def component
46
- return Primer::BaseComponent.new(**@kwargs) unless @button
46
+ return Primer::BaseComponent.new(**@system_arguments) unless @button
47
47
 
48
- Primer::ButtonComponent.new(**@kwargs)
48
+ Primer::ButtonComponent.new(**@system_arguments)
49
49
  end
50
50
  end
51
51
 
52
52
  class Body < Primer::Slot
53
- def initialize(**kwargs)
54
- @kwargs = kwargs
55
- @kwargs[:tag] ||= :div
53
+ def initialize(**system_arguments)
54
+ @system_arguments = system_arguments
55
+ @system_arguments[:tag] ||= :div
56
56
  end
57
57
 
58
58
  def component
59
- Primer::BaseComponent.new(**@kwargs)
59
+ Primer::BaseComponent.new(**@system_arguments)
60
60
  end
61
61
  end
62
62
  end
@@ -1,4 +1,4 @@
1
- <%= render Primer::BaseComponent.new(**@kwargs) do %>
1
+ <%= render Primer::BaseComponent.new(**@system_arguments) do %>
2
2
  <% if @header.present? %>
3
3
  <div class="dropdown-header">
4
4
  <%= @header %>
@@ -11,14 +11,14 @@ module Primer
11
11
  DIRECTION_DEFAULT = :se
12
12
  DIRECTION_OPTIONS = [DIRECTION_DEFAULT, :sw, :w, :e, :ne, :s]
13
13
 
14
- def initialize(direction: DIRECTION_DEFAULT, scheme: SCHEME_DEFAULT, header: nil, **kwargs)
15
- @header, @direction, @kwargs = header, direction, kwargs
14
+ def initialize(direction: DIRECTION_DEFAULT, scheme: SCHEME_DEFAULT, header: nil, **system_arguments)
15
+ @header, @direction, @system_arguments = header, direction, system_arguments
16
16
 
17
- @kwargs[:tag] = "details-menu"
18
- @kwargs[:role] = "menu"
17
+ @system_arguments[:tag] = "details-menu"
18
+ @system_arguments[:role] = "menu"
19
19
 
20
- @kwargs[:classes] = class_names(
21
- @kwargs[:classes],
20
+ @system_arguments[:classes] = class_names(
21
+ @system_arguments[:classes],
22
22
  "dropdown-menu",
23
23
  "dropdown-menu-#{fetch_or_fallback(DIRECTION_OPTIONS, direction, DIRECTION_DEFAULT)}",
24
24
  SCHEME_MAPPINGS[fetch_or_fallback(SCHEME_MAPPINGS.keys, scheme, SCHEME_DEFAULT)]
@@ -1,4 +1,4 @@
1
- <%= render Primer::BaseComponent.new(**@kwargs) do %>
1
+ <%= render Primer::BaseComponent.new(**@system_arguments) do %>
2
2
  <%= render(Primer::OcticonComponent.new(icon: @icon)) if @icon %>
3
3
  <%= content %>
4
4
  <% if @dismissible %>
@@ -7,7 +7,7 @@
7
7
  </button>
8
8
  <% end %>
9
9
  <% if actions.present? %>
10
- <%= render Primer::BaseComponent.new(**actions.kwargs) do %>
10
+ <%= render Primer::BaseComponent.new(**actions.system_arguments) do %>
11
11
  <%= actions.content %>
12
12
  <% end %>
13
13
  <% end %>
@@ -42,31 +42,31 @@ module Primer
42
42
  # @param dismissible [Boolean] Whether the component can be dismissed with an X button.
43
43
  # @param icon [String] Name of Octicon icon to use.
44
44
  # @param variant [Symbol] <%= one_of(Primer::FlashComponent::VARIANT_MAPPINGS.keys) %>
45
- # @param kwargs [Hash] <%= link_to_style_arguments_docs %>
46
- def initialize(full: false, spacious: false, dismissible: false, icon: nil, variant: DEFAULT_VARIANT, **kwargs)
45
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
46
+ def initialize(full: false, spacious: false, dismissible: false, icon: nil, variant: DEFAULT_VARIANT, **system_arguments)
47
47
  @icon = icon
48
48
  @dismissible = dismissible
49
- @kwargs = kwargs
50
- @kwargs[:tag] = :div
51
- @kwargs[:classes] = class_names(
52
- @kwargs[:classes],
49
+ @system_arguments = system_arguments
50
+ @system_arguments[:tag] = :div
51
+ @system_arguments[:classes] = class_names(
52
+ @system_arguments[:classes],
53
53
  "flash",
54
54
  VARIANT_MAPPINGS[fetch_or_fallback(VARIANT_MAPPINGS.keys, variant, DEFAULT_VARIANT)],
55
55
  "flash-full": full
56
56
  )
57
- @kwargs[:mb] ||= spacious ? 4 : nil
57
+ @system_arguments[:mb] ||= spacious ? 4 : nil
58
58
  end
59
59
 
60
60
  class Actions < ViewComponent::Slot
61
61
  include ClassNameHelper
62
62
 
63
- attr_reader :kwargs
63
+ attr_reader :system_arguments
64
64
 
65
- # @param kwargs [Hash] <%= link_to_style_arguments_docs %>
66
- def initialize(**kwargs)
67
- @kwargs = kwargs
68
- @kwargs[:tag] = :div
69
- @kwargs[:classes] = class_names(@kwargs[:classes], "flash-action")
65
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
66
+ def initialize(**system_arguments)
67
+ @system_arguments = system_arguments
68
+ @system_arguments[:tag] = :div
69
+ @system_arguments[:classes] = class_names(@system_arguments[:classes], "flash-action")
70
70
  end
71
71
  end
72
72
  end
@@ -37,7 +37,7 @@ module Primer
37
37
  flex_wrap: FLEX_WRAP_DEFAULT,
38
38
  align_items: ALIGN_ITEMS_DEFAULT,
39
39
  direction: nil,
40
- **kwargs
40
+ **system_arguments
41
41
  )
42
42
  @align_items = fetch_or_fallback(ALIGN_ITEMS_OPTIONS, align_items, ALIGN_ITEMS_DEFAULT)
43
43
  @justify_content = fetch_or_fallback(JUSTIFY_CONTENT_OPTIONS, justify_content, JUSTIFY_CONTENT_DEFAULT)
@@ -51,13 +51,13 @@ module Primer
51
51
  DEFAULT_DIRECTION
52
52
  end
53
53
 
54
- @kwargs = kwargs.merge({ direction: @direction }.compact)
55
- @kwargs[:classes] = class_names(@kwargs[:classes], component_class_names)
56
- @kwargs[:display] = fetch_or_fallback(INLINE_OPTIONS, inline, INLINE_DEFAULT) ? :inline_flex : :flex
54
+ @system_arguments = system_arguments.merge({ direction: @direction }.compact)
55
+ @system_arguments[:classes] = class_names(@system_arguments[:classes], component_class_names)
56
+ @system_arguments[:display] = fetch_or_fallback(INLINE_OPTIONS, inline, INLINE_DEFAULT) ? :inline_flex : :flex
57
57
  end
58
58
 
59
59
  def call
60
- render(Primer::BoxComponent.new(**@kwargs)) { content }
60
+ render(Primer::BoxComponent.new(**@system_arguments)) { content }
61
61
  end
62
62
 
63
63
  private
@@ -5,17 +5,17 @@ module Primer
5
5
  FLEX_AUTO_DEFAULT = false
6
6
  FLEX_AUTO_ALLOWED_VALUES = [FLEX_AUTO_DEFAULT, true]
7
7
 
8
- def initialize(flex_auto: FLEX_AUTO_DEFAULT, **kwargs)
9
- @kwargs = kwargs
10
- @kwargs[:classes] =
8
+ def initialize(flex_auto: FLEX_AUTO_DEFAULT, **system_arguments)
9
+ @system_arguments = system_arguments
10
+ @system_arguments[:classes] =
11
11
  class_names(
12
- @kwargs[:classes],
12
+ @system_arguments[:classes],
13
13
  "flex-auto" => fetch_or_fallback(FLEX_AUTO_ALLOWED_VALUES, flex_auto, FLEX_AUTO_DEFAULT)
14
14
  )
15
15
  end
16
16
 
17
17
  def call
18
- render(Primer::BoxComponent.new(**@kwargs)) { content }
18
+ render(Primer::BoxComponent.new(**@system_arguments)) { content }
19
19
  end
20
20
  end
21
21
  end
@@ -2,13 +2,13 @@
2
2
 
3
3
  module Primer
4
4
  class HeadingComponent < Primer::Component
5
- def initialize(**kwargs)
6
- @kwargs = kwargs
7
- @kwargs[:tag] ||= :h1
5
+ def initialize(**system_arguments)
6
+ @system_arguments = system_arguments
7
+ @system_arguments[:tag] ||= :h1
8
8
  end
9
9
 
10
10
  def call
11
- render(Primer::BaseComponent.new(**@kwargs)) { content }
11
+ render(Primer::BaseComponent.new(**@system_arguments)) { content }
12
12
  end
13
13
  end
14
14
  end
@@ -44,22 +44,22 @@ module Primer
44
44
  # @param title [String] `title` attribute for the component element.
45
45
  # @param scheme [Symbol] <%= one_of(Primer::LabelComponent::SCHEME_OPTIONS) %>
46
46
  # @param variant [Symbol] <%= one_of(Primer::LabelComponent::VARIANT_OPTIONS) %>
47
- # @param kwargs [Hash] <%= link_to_style_arguments_docs %>
48
- def initialize(title:, scheme: nil, variant: nil, **kwargs)
49
- @kwargs = kwargs
50
- @kwargs[:bg] = :blue if scheme.nil?
51
- @kwargs[:tag] ||= :span
52
- @kwargs[:title] = title
53
- @kwargs[:classes] = class_names(
47
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
48
+ def initialize(title:, scheme: nil, variant: nil, **system_arguments)
49
+ @system_arguments = system_arguments
50
+ @system_arguments[:bg] = :blue if scheme.nil?
51
+ @system_arguments[:tag] ||= :span
52
+ @system_arguments[:title] = title
53
+ @system_arguments[:classes] = class_names(
54
54
  "Label",
55
- kwargs[:classes],
55
+ system_arguments[:classes],
56
56
  SCHEME_MAPPINGS[fetch_or_fallback(SCHEME_OPTIONS, scheme)],
57
57
  VARIANT_MAPPINGS[fetch_or_fallback(VARIANT_OPTIONS, variant)]
58
58
  )
59
59
  end
60
60
 
61
61
  def call
62
- render(Primer::BaseComponent.new(**@kwargs)) { content }
62
+ render(Primer::BaseComponent.new(**@system_arguments)) { content }
63
63
  end
64
64
  end
65
65
  end
@@ -1,4 +1,4 @@
1
- <%= render(Primer::FlexComponent.new(**@kwargs)) do %>
1
+ <%= render(Primer::FlexComponent.new(**@system_arguments)) do %>
2
2
  <% if @side == :left %>
3
3
  <%= render Primer::BaseComponent.new(tag: :div, classes: "flex-shrink-0", col: (@responsive ? [12, nil, @sidebar_col] : @sidebar_col), mb: (@responsive ? [4, nil, 0] : nil)) do %>
4
4
  <%= sidebar %>
@@ -27,16 +27,16 @@ module Primer
27
27
  # @param responsive [Boolean] Whether to collapse layout to a single column at smaller widths.
28
28
  # @param side [Symbol] Which side to display the sidebar on. <%= one_of(Primer::LayoutComponent::ALLOWED_SIDES) %>
29
29
  # @param sidebar_col [Integer] Sidebar column width.
30
- # @param kwargs [Hash] <%= link_to_style_arguments_docs %>
31
- def initialize(responsive: false, side: DEFAULT_SIDE, sidebar_col: DEFAULT_SIDEBAR_COL, **kwargs)
32
- @kwargs = kwargs
30
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
31
+ def initialize(responsive: false, side: DEFAULT_SIDE, sidebar_col: DEFAULT_SIDEBAR_COL, **system_arguments)
32
+ @system_arguments = system_arguments
33
33
  @side = fetch_or_fallback(ALLOWED_SIDES, side, DEFAULT_SIDE)
34
34
  @responsive = responsive
35
- @kwargs[:classes] = class_names(
35
+ @system_arguments[:classes] = class_names(
36
36
  "gutter-condensed gutter-lg",
37
- @kwargs[:classes]
37
+ @system_arguments[:classes]
38
38
  )
39
- @kwargs[:direction] = responsive ? [:column, nil, :row] : nil
39
+ @system_arguments[:direction] = responsive ? [:column, nil, :row] : nil
40
40
 
41
41
  @sidebar_col = fetch_or_fallback(ALLOWED_SIDEBAR_COLS, sidebar_col, DEFAULT_SIDEBAR_COL)
42
42
  @main_col = MAX_COL - @sidebar_col
@@ -11,19 +11,19 @@ module Primer
11
11
  #
12
12
  # @param href [String] URL to be used for the Link
13
13
  # @param muted [Boolean] Uses light gray for Link color, and blue on hover
14
- # @param kwargs [Hash] <%= link_to_style_arguments_docs %>
15
- def initialize(href:, muted: false, **kwargs)
16
- @kwargs = kwargs
17
- @kwargs[:tag] = :a
18
- @kwargs[:href] = href
19
- @kwargs[:classes] = class_names(
20
- @kwargs[:classes],
14
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
15
+ def initialize(href:, muted: false, **system_arguments)
16
+ @system_arguments = system_arguments
17
+ @system_arguments[:tag] = :a
18
+ @system_arguments[:href] = href
19
+ @system_arguments[:classes] = class_names(
20
+ @system_arguments[:classes],
21
21
  "muted-link" => fetch_or_fallback([true, false], muted, false)
22
22
  )
23
23
  end
24
24
 
25
25
  def call
26
- render(Primer::BaseComponent.new(**@kwargs)) { content }
26
+ render(Primer::BaseComponent.new(**@system_arguments)) { content }
27
27
  end
28
28
  end
29
29
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Primer
4
- # Renders an [Octicon](https://primer.style/octicons/) with <%= link_to_style_arguments_docs %>.
4
+ # Renders an [Octicon](https://primer.style/octicons/) with <%= link_to_system_arguments_docs %>.
5
5
  class OcticonComponent < Primer::Component
6
6
  include Primer::ClassNameHelper
7
7
  include OcticonsHelper
@@ -24,22 +24,22 @@ module Primer
24
24
  # <%= render(Primer::OcticonComponent.new(icon: "x", size: :large)) %>
25
25
  #
26
26
  # @param icon [String] Name of [Octicon](https://primer.style/octicons/) to use.
27
- # @param size [Symbol] <%= one_of(Primer::OcticonComponent::SIZE_OPTIONS) %>
28
- # @param kwargs [Hash] <%= link_to_style_arguments_docs %>
29
- def initialize(icon:, size: SIZE_DEFAULT, **kwargs)
30
- @icon, @kwargs = icon, kwargs
27
+ # @param size [Symbol] <%= one_of(Primer::OcticonComponent::SIZE_MAPPINGS) %>
28
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
29
+ def initialize(icon:, size: SIZE_DEFAULT, **system_arguments)
30
+ @icon, @system_arguments = icon, system_arguments
31
31
 
32
- @kwargs[:class] = Primer::Classify.call(**@kwargs)[:class]
33
- @kwargs[:height] ||= SIZE_MAPPINGS[size]
32
+ @system_arguments[:class] = Primer::Classify.call(**@system_arguments)[:class]
33
+ @system_arguments[:height] ||= SIZE_MAPPINGS[size]
34
34
 
35
35
  # Filter out classify options to prevent them from becoming invalid html attributes.
36
36
  # Note height and width are both classify options and valid html attributes.
37
- octicon_helper_options = @kwargs.slice(:height, :width)
38
- @kwargs = @kwargs.except(*Primer::Classify::VALID_KEYS, :classes).merge(octicon_helper_options)
37
+ octicon_helper_options = @system_arguments.slice(:height, :width)
38
+ @system_arguments = @system_arguments.except(*Primer::Classify::VALID_KEYS, :classes).merge(octicon_helper_options)
39
39
  end
40
40
 
41
41
  def call
42
- octicon(@icon, **@kwargs)
42
+ octicon(@icon, **@system_arguments)
43
43
  end
44
44
  end
45
45
  end
@@ -1,4 +1,4 @@
1
- <%= render Primer::BaseComponent.new(**@kwargs) do %>
1
+ <%= render Primer::BaseComponent.new(**@system_arguments) do %>
2
2
  <%= render body.component do %>
3
3
  <% if heading %>
4
4
  <%= render heading.component do %>
@@ -40,17 +40,17 @@ module Primer
40
40
  # <% end %>
41
41
  # <% end %>
42
42
  #
43
- # @param kwargs [Hash] <%= link_to_style_arguments_docs %>
44
- def initialize(**kwargs)
45
- @kwargs = kwargs
46
- @kwargs[:tag] ||= :div
47
- @kwargs[:classes] = class_names(
48
- kwargs[:classes],
43
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
44
+ def initialize(**system_arguments)
45
+ @system_arguments = system_arguments
46
+ @system_arguments[:tag] ||= :div
47
+ @system_arguments[:classes] = class_names(
48
+ system_arguments[:classes],
49
49
  "Popover"
50
50
  )
51
- @kwargs[:position] ||= :relative
52
- @kwargs[:right] = false unless kwargs.key?(:right)
53
- @kwargs[:left] = false unless kwargs.key?(:left)
51
+ @system_arguments[:position] ||= :relative
52
+ @system_arguments[:right] = false unless system_arguments.key?(:right)
53
+ @system_arguments[:left] = false unless system_arguments.key?(:left)
54
54
  end
55
55
 
56
56
  def render?
@@ -58,15 +58,15 @@ module Primer
58
58
  end
59
59
 
60
60
  class Heading < ViewComponent::Slot
61
- # @param kwargs [Hash] <%= link_to_style_arguments_docs %>
62
- def initialize(**kwargs)
63
- @kwargs = kwargs
64
- @kwargs[:mb] ||= 2
65
- @kwargs[:tag] ||= :h4
61
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
62
+ def initialize(**system_arguments)
63
+ @system_arguments = system_arguments
64
+ @system_arguments[:mb] ||= 2
65
+ @system_arguments[:tag] ||= :h4
66
66
  end
67
67
 
68
68
  def component
69
- Primer::HeadingComponent.new(**@kwargs)
69
+ Primer::HeadingComponent.new(**@system_arguments)
70
70
  end
71
71
  end
72
72
 
@@ -89,24 +89,24 @@ module Primer
89
89
 
90
90
  # @param caret [Symbol] <%= one_of(Primer::PopoverComponent::Body::CARET_MAPPINGS.keys) %>
91
91
  # @param large [Boolean] Whether to use the large version of the component.
92
- # @param kwargs [Hash] <%= link_to_style_arguments_docs %>
93
- def initialize(caret: CARET_DEFAULT, large: false, **kwargs)
94
- @kwargs = kwargs
95
- @kwargs[:classes] = class_names(
96
- kwargs[:classes],
92
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
93
+ def initialize(caret: CARET_DEFAULT, large: false, **system_arguments)
94
+ @system_arguments = system_arguments
95
+ @system_arguments[:classes] = class_names(
96
+ system_arguments[:classes],
97
97
  "Popover-message Box",
98
98
  CARET_MAPPINGS[fetch_or_fallback(CARET_MAPPINGS.keys, caret, CARET_DEFAULT)],
99
99
  "Popover-message--large" => large
100
100
  )
101
- @kwargs[:p] ||= 4
102
- @kwargs[:mt] ||= 2
103
- @kwargs[:mx] ||= :auto
104
- @kwargs[:text_align] ||= :left
105
- @kwargs[:box_shadow] ||= :large
101
+ @system_arguments[:p] ||= 4
102
+ @system_arguments[:mt] ||= 2
103
+ @system_arguments[:mx] ||= :auto
104
+ @system_arguments[:text_align] ||= :left
105
+ @system_arguments[:box_shadow] ||= :large
106
106
  end
107
107
 
108
108
  def component
109
- Primer::BoxComponent.new(**@kwargs)
109
+ Primer::BoxComponent.new(**@system_arguments)
110
110
  end
111
111
  end
112
112
  end
@@ -1,5 +1,5 @@
1
- <%= render Primer::BaseComponent.new(**@kwargs) do %>
1
+ <%= render Primer::BaseComponent.new(**@system_arguments) do %>
2
2
  <% items.each do |item| %>
3
- <%= render Primer::BaseComponent.new(**item.kwargs) %>
3
+ <%= render Primer::BaseComponent.new(**item.system_arguments) %>
4
4
  <% end %>
5
5
  <% end %>