primer_view_components 0.0.12 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -1
- data/app/components/primer/avatar_component.rb +11 -11
- data/app/components/primer/base_component.rb +102 -9
- data/app/components/primer/blankslate_component.html.erb +5 -5
- data/app/components/primer/blankslate_component.rb +31 -6
- data/app/components/primer/border_box_component.html.erb +5 -5
- data/app/components/primer/border_box_component.rb +34 -34
- data/app/components/primer/box_component.rb +5 -5
- data/app/components/primer/breadcrumb_component.html.erb +2 -2
- data/app/components/primer/breadcrumb_component.rb +12 -12
- data/app/components/primer/button_component.rb +9 -9
- data/app/components/primer/component.rb +1 -0
- data/app/components/primer/counter_component.rb +16 -15
- data/app/components/primer/details_component.html.erb +1 -1
- data/app/components/primer/details_component.rb +15 -15
- data/app/components/primer/dropdown_menu_component.html.erb +1 -1
- data/app/components/primer/dropdown_menu_component.rb +6 -6
- data/app/components/primer/flash_component.html.erb +2 -2
- data/app/components/primer/flash_component.rb +14 -16
- data/app/components/primer/flex_component.rb +5 -5
- data/app/components/primer/flex_item_component.rb +5 -5
- data/app/components/primer/heading_component.rb +4 -4
- data/app/components/primer/label_component.rb +22 -16
- data/app/components/primer/layout_component.html.erb +1 -1
- data/app/components/primer/layout_component.rb +6 -6
- data/app/components/primer/link_component.rb +9 -9
- data/app/components/primer/octicon_component.rb +10 -10
- data/app/components/primer/popover_component.html.erb +1 -1
- data/app/components/primer/popover_component.rb +27 -27
- data/app/components/primer/progress_bar_component.html.erb +2 -2
- data/app/components/primer/progress_bar_component.rb +16 -16
- data/app/components/primer/slot.rb +1 -0
- data/app/components/primer/spinner_component.html.erb +1 -1
- data/app/components/primer/spinner_component.rb +9 -9
- data/app/components/primer/state_component.rb +8 -8
- data/app/components/primer/subhead_component.html.erb +4 -4
- data/app/components/primer/subhead_component.rb +26 -26
- data/app/components/primer/text_component.rb +5 -5
- data/app/components/primer/timeline_item_component.html.erb +4 -4
- data/app/components/primer/timeline_item_component.rb +28 -28
- data/app/components/primer/underline_nav_component.html.erb +1 -1
- data/app/components/primer/underline_nav_component.rb +5 -5
- data/app/components/primer/view_components.rb +1 -0
- data/lib/primer/classify.rb +7 -6
- data/lib/primer/fetch_or_fallback_helper.rb +8 -0
- data/lib/primer/join_style_arguments_helper.rb +13 -0
- data/lib/primer/view_components/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70daa13e7909487e01c01f4759a88740922070c985ac9604df738614d48c57a1
|
4
|
+
data.tar.gz: 257383c54d408d94c8aac723804a1db9b75dee88527f60ce101f70514259567c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65bef1719944f20523e8670d382474fa15a49cd03eab6a39578ad3901933668c3d2bcfdff9da7e46ba9fdac8587447b92984a6e4c67028732f9ba2f18dc9cf52
|
7
|
+
data.tar.gz: b578660620dc448087463fd24361c652a8fd9ead88cd6693a658af94f497eb68361e3236cb43386da66f58666c72051d5728bb67b4be6c832ee815c54f59e4c8
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,44 @@
|
|
2
2
|
|
3
3
|
## main
|
4
4
|
|
5
|
+
## 0.0.17
|
6
|
+
|
7
|
+
* Ensure all components support inline styles.
|
8
|
+
|
9
|
+
*Joel Hawksley*
|
10
|
+
|
11
|
+
## 0.0.16
|
12
|
+
|
13
|
+
* Adding a `spinner` slot to the `BlankslateComponent` that uses the `SpinnerComponent` added in `0.0.10`.
|
14
|
+
|
15
|
+
*Jon Rohan*
|
16
|
+
|
17
|
+
* Bumping node engine to version `15.x`
|
18
|
+
|
19
|
+
*Jon Rohan*
|
20
|
+
|
21
|
+
## 0.0.15
|
22
|
+
|
23
|
+
* Add ability to disable `limit` on Counter.
|
24
|
+
|
25
|
+
*Christian Giordano*
|
26
|
+
|
27
|
+
* Rename `v` system argument to `visibility`.
|
28
|
+
|
29
|
+
*Joel Hawksley*
|
30
|
+
|
31
|
+
## 0.0.14
|
32
|
+
|
33
|
+
* Add functional colors to Label.
|
34
|
+
|
35
|
+
*Joel Hawksley*
|
36
|
+
|
37
|
+
## 0.0.13
|
38
|
+
|
39
|
+
* Add support for `xl` breakpoint.
|
40
|
+
|
41
|
+
*Joel Hawksley*
|
42
|
+
|
5
43
|
## 0.0.12
|
6
44
|
|
7
45
|
* Adds support for disabling inline box-sizing style for `SpinnerComponent` via style parameter `Primer::SpinnerComponent.new(style: nil)`.
|
@@ -88,7 +126,7 @@
|
|
88
126
|
|
89
127
|
## 0.0.3
|
90
128
|
|
91
|
-
* Add support for responsive `float`
|
129
|
+
* Add support for responsive `float` system argument.
|
92
130
|
|
93
131
|
*Joel Hawksley*
|
94
132
|
|
@@ -15,25 +15,25 @@ module Primer
|
|
15
15
|
# @param alt [String] Passed through to alt on img tag
|
16
16
|
# @param size [Integer] Adds the avatar-small class if less than 24
|
17
17
|
# @param square [Boolean] Used to create a square avatar.
|
18
|
-
def initialize(src:, alt:, size: 20, square: false, **
|
19
|
-
@
|
20
|
-
@
|
21
|
-
@
|
22
|
-
@
|
23
|
-
@
|
24
|
-
@
|
25
|
-
@
|
18
|
+
def initialize(src:, alt:, size: 20, square: false, **system_arguments)
|
19
|
+
@system_arguments = system_arguments
|
20
|
+
@system_arguments[:tag] = :img
|
21
|
+
@system_arguments[:src] = src
|
22
|
+
@system_arguments[:alt] = alt
|
23
|
+
@system_arguments[:size] = size
|
24
|
+
@system_arguments[:height] = size
|
25
|
+
@system_arguments[:width] = size
|
26
26
|
|
27
|
-
@
|
27
|
+
@system_arguments[:classes] = class_names(
|
28
28
|
"avatar",
|
29
|
-
|
29
|
+
system_arguments[:classes],
|
30
30
|
"avatar--small" => size < SMALL_THRESHOLD,
|
31
31
|
"CircleBadge" => !square
|
32
32
|
)
|
33
33
|
end
|
34
34
|
|
35
35
|
def call
|
36
|
-
render(Primer::BaseComponent.new(**@
|
36
|
+
render(Primer::BaseComponent.new(**@system_arguments)) { content }
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
@@ -1,22 +1,115 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Primer
|
4
|
-
#
|
4
|
+
# All Primer ViewComponents accept a standard set of options called system arguments, mimicking the [styled-system API](https://styled-system.com/table) used by [Primer React](https://primer.style/components/system-props).
|
5
|
+
#
|
6
|
+
# Under the hood, system arguments are [mapped](https://github.com/primer/view_components/blob/main/lib/primer/classify.rb) to Primer CSS classes, with any remaining options passed to Rails' [`content_tag`](https://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-content_tag).
|
7
|
+
#
|
8
|
+
# ## Responsive values
|
9
|
+
#
|
10
|
+
# To apply different values across responsive breakpoints, pass an array with up to five values in the order `[default, small, medium, large, xlarge]`. To skip a breakpoint, pass `nil`.
|
11
|
+
#
|
12
|
+
# For example:
|
13
|
+
#
|
14
|
+
# ```erb
|
15
|
+
# <%= render Primer::HeadingComponent.new(mt: [0, nil, nil, 4, 2]) do %>
|
16
|
+
# Hello world
|
17
|
+
# <% end %>
|
18
|
+
# ```
|
19
|
+
#
|
20
|
+
# Renders:
|
21
|
+
#
|
22
|
+
# ```html
|
23
|
+
# <h1 class="mt-0 mt-lg-4 mt-xl-2">Hello world</h1>
|
24
|
+
# ```
|
25
|
+
#
|
26
|
+
# ## HTML attributes
|
27
|
+
#
|
28
|
+
# System arguments include most HTML attributes. For example:
|
29
|
+
#
|
30
|
+
# | Name | Type | Description |
|
31
|
+
# | :- | :- | :- |
|
32
|
+
# | `width` | `Integer` | Width. |
|
33
|
+
# | `height` | `Integer` | Height. |
|
34
|
+
# | `data` | `Hash` | Data attributes: `data: { foo: :bar }` renders `data-foo='bar'`. |
|
35
|
+
# | `aria` | `Hash` | Aria attributes: `aria: { label: "foo" }` renders `aria-label='foo'`. |
|
36
|
+
# | `title` | `String` | The `title` attribute. |
|
37
|
+
# | `style` | `String` | Inline styles. |
|
38
|
+
# | `hidden` | `Boolean` | Whether to assign the `hidden` attribute. |
|
5
39
|
class BaseComponent < Primer::Component
|
6
40
|
TEST_SELECTOR_TAG = :test_selector
|
7
|
-
|
41
|
+
# @param test_selector [String] Adds `data-test-selector='given value'` in non-Production environments for testing purposes.
|
42
|
+
#
|
43
|
+
# @param m [Integer] Margin. <%= one_of((-6..6).to_a) %>
|
44
|
+
# @param mt [Integer] Margin left. <%= one_of((-6..6).to_a) %>
|
45
|
+
# @param mr [Integer] Margin right. <%= one_of((-6..6).to_a) %>
|
46
|
+
# @param mb [Integer] Margin bottom. <%= one_of((-6..6).to_a) %>
|
47
|
+
# @param ml [Integer] Margin left. <%= one_of((-6..6).to_a) %>
|
48
|
+
# @param mx [Integer] Horizontal margins. <%= one_of((-6..6).to_a + [:auto]) %>
|
49
|
+
# @param my [Integer] Vertical margins. <%= one_of((-6..6).to_a) %>
|
50
|
+
# @param p [Integer] Padding. <%= one_of((0..6).to_a) %>
|
51
|
+
# @param pt [Integer] Padding left. <%= one_of((0..6).to_a) %>
|
52
|
+
# @param pr [Integer] Padding right. <%= one_of((0..6).to_a) %>
|
53
|
+
# @param pb [Integer] Padding bottom. <%= one_of((0..6).to_a) %>
|
54
|
+
# @param pl [Integer] Padding left. <%= one_of((0..6).to_a) %>
|
55
|
+
# @param px [Integer] Horizontal padding. <%= one_of((0..6).to_a) %>
|
56
|
+
# @param py [Integer] Vertical padding. <%= one_of((0..6).to_a) %>
|
57
|
+
#
|
58
|
+
# @param position [Symbol] <%= one_of([:relative, :absolute, :fixed]) %>
|
59
|
+
#
|
60
|
+
# @param top [Boolean] If `false`, sets `top: 0`.
|
61
|
+
# @param right [Boolean] If `false`, sets `right: 0`.
|
62
|
+
# @param bottom [Boolean] If `false`, sets `bottom: 0`.
|
63
|
+
# @param left [Boolean] If `false`, sets `left: 0`.
|
64
|
+
#
|
65
|
+
# @param display [Symbol] <%= one_of([:block, :none, :inline, :inline_block, :table, :table_cell]) %>
|
66
|
+
#
|
67
|
+
# @param v [Symbol] Visibility. <%= one_of([:hidden, :visible]) %>
|
68
|
+
#
|
69
|
+
# @param hide [Symbol] Hide the element at a specific breakpoint. <%= one_of([:sm, :md, :lg, :xl]) %>
|
70
|
+
#
|
71
|
+
# @param vertical_align [Symbol] <%= one_of([:baseline, :top, :middle, :bottom, :text_top, :text_bottom]) %>
|
72
|
+
#
|
73
|
+
# @param float [Symbol] <%= one_of([:left, :right]) %>
|
74
|
+
#
|
75
|
+
# @param col [Integer] Number of columns.
|
76
|
+
#
|
77
|
+
# @param underline [Boolean] Whether text should be underlined.
|
78
|
+
#
|
79
|
+
# @param color [Symbol] Text color. <%= one_of([:blue, :red, :gray_light, :gray, :gray_dark, :green, :orange, :orange_light, :purple, :pink, :white, :inherit]) %> Note: this API is subject to change as we move to functional colors.
|
80
|
+
# @param bg [String, Symbol] Background color. Accepts either a hex value as a String or a color name as a Symbol.
|
81
|
+
#
|
82
|
+
# @param box_shadow [Boolean, Symbol] Box shadow. <%= one_of([true, :medium, :large, :extra_large, :none]) %>
|
83
|
+
# @param border [Symbol] <%= one_of([:left, :top, :bottom, :right, :y, :x]) %>
|
84
|
+
# @param border_color [Symbol] <%= one_of([:blue, :blue_light, :gray, :gray_dark, :green, :purple, :red, :red_light, :white, :yellow, :black_fade]) %> Note: this API is subject to change as we move to functional colors.
|
85
|
+
# @param border_top [Integer] Set to `0` to remove the top border.
|
86
|
+
# @param border_bottom [Integer] Set to `0` to remove the bottom border.
|
87
|
+
# @param border_left [Integer] Set to `0` to remove the left border.
|
88
|
+
# @param border_right [Integer] Set to `0` to remove the right border.
|
89
|
+
#
|
90
|
+
# @param font_size [String, Integer] <%= one_of(["00", 0, 1, 2, 3, 4, 5, 6]) %>
|
91
|
+
# @param text_align [Symbol] Text alignment. <%= one_of([:left, :right, :center]) %>
|
92
|
+
# @param font_weight [Symbol] Font weight. <%= one_of([:light, :normal, :bold]) %>
|
93
|
+
#
|
94
|
+
# @param flex [Integer, Symbol] <%= one_of([1, :auto]) %>
|
95
|
+
# @param flex_grow [Integer] To enable, set to `0`.
|
96
|
+
# @param flex_shrink [Integer] To enable, set to `0`.
|
97
|
+
# @param align_self [Symbol] <%= one_of([:auto, :start, :end, :center, :baseline, :stretch]) %>
|
98
|
+
# @param justify_content [Symbol] <%= one_of([:flex_start, :flex_end, :center, :space_between, :space_around]) %>
|
99
|
+
# @param align_items [Symbol] <%= one_of([:flex_start, :flex_end, :center, :baseline, :stretch]) %>
|
100
|
+
# @param width [Symbol] <%= one_of([:fit, :fill]) %>
|
101
|
+
# @param height [Symbol] <%= one_of([:fit, :fill]) %>
|
8
102
|
#
|
9
|
-
# @
|
10
|
-
# <%= render(Primer::BaseComponent.new(tag: :a, href: "http://www.google.com", mt: 4)) { "Link" } %>
|
103
|
+
# @param word_break [Symbol] Whether to break words on line breaks. Can only be `:break_all`.
|
11
104
|
#
|
12
|
-
# @param tag [Symbol] HTML tag name to be passed to tag.send
|
13
|
-
# @param classes [String] CSS class name value to be concatenated with generated Primer CSS classes
|
14
|
-
def initialize(tag:, classes: nil, **
|
105
|
+
# @param tag [Symbol] HTML tag name to be passed to `tag.send`.
|
106
|
+
# @param classes [String] CSS class name value to be concatenated with generated Primer CSS classes.
|
107
|
+
def initialize(tag:, classes: nil, **system_arguments)
|
15
108
|
@tag = tag
|
16
|
-
@result = Primer::Classify.call(**
|
109
|
+
@result = Primer::Classify.call(**system_arguments.merge(classes: classes))
|
17
110
|
|
18
111
|
# Filter out Primer keys so they don't get assigned as HTML attributes
|
19
|
-
@content_tag_args = add_test_selector(
|
112
|
+
@content_tag_args = add_test_selector(system_arguments).except(*Primer::Classify::VALID_KEYS)
|
20
113
|
end
|
21
114
|
|
22
115
|
def call
|
@@ -1,13 +1,13 @@
|
|
1
|
-
<%= render Primer::BaseComponent.new(**@
|
2
|
-
<% if
|
1
|
+
<%= render Primer::BaseComponent.new(**@system_arguments) do %>
|
2
|
+
<% if spinner.present? %>
|
3
|
+
<%= render spinner.component %>
|
4
|
+
<% elsif @icon.present? %>
|
3
5
|
<%= render(Primer::OcticonComponent.new(
|
4
6
|
icon: @icon,
|
5
7
|
size: @icon_size,
|
6
8
|
classes: "blankslate-icon"
|
7
9
|
)) %>
|
8
|
-
<%
|
9
|
-
|
10
|
-
<% if @image_src.present? && @image_alt.present? %>
|
10
|
+
<% elsif @image_src.present? && @image_alt.present? %>
|
11
11
|
<%= image_tag "#{@image_src}", class: "mb-3", size: "56x56", alt: "#{@image_alt}" %>
|
12
12
|
<% end %>
|
13
13
|
|
@@ -3,6 +3,10 @@
|
|
3
3
|
module Primer
|
4
4
|
# Use Primer::BlankslateComponent when there is a lack of content within a page or section. Use as placeholder to tell users why something isn't there.
|
5
5
|
class BlankslateComponent < Primer::Component
|
6
|
+
include ViewComponent::Slotable
|
7
|
+
|
8
|
+
with_slot :spinner, class_name: "Spinner"
|
9
|
+
|
6
10
|
#
|
7
11
|
# @example 150|Basic
|
8
12
|
# <%= render Primer::BlankslateComponent.new(
|
@@ -17,6 +21,14 @@ module Primer
|
|
17
21
|
# description: "Description",
|
18
22
|
# ) %>
|
19
23
|
#
|
24
|
+
# @example 220|Loading|Add a [SpinnerComponent](https://primer.style/view-components/components/spinner) to the blankslate in place of an icon.
|
25
|
+
# <%= render Primer::BlankslateComponent.new(
|
26
|
+
# title: "Title",
|
27
|
+
# description: "Description",
|
28
|
+
# ) do |component| %>
|
29
|
+
# <% component.slot(:spinner, size: :large) %>
|
30
|
+
# <% end %>
|
31
|
+
#
|
20
32
|
# @example 150|Custom content|Pass custom content as a block in place of `description`.
|
21
33
|
# <%= render Primer::BlankslateComponent.new(
|
22
34
|
# title: "Title",
|
@@ -56,7 +68,7 @@ module Primer
|
|
56
68
|
# @param title [String] Text that appears in a larger bold font.
|
57
69
|
# @param title_tag [Symbol] HTML tag to use for title.
|
58
70
|
# @param icon [String] Octicon icon to use at top of component.
|
59
|
-
# @param icon_size [Symbol] <%= one_of(Primer::OcticonComponent::SIZE_MAPPINGS
|
71
|
+
# @param icon_size [Symbol] <%= one_of(Primer::OcticonComponent::SIZE_MAPPINGS) %>
|
60
72
|
# @param image_src [String] Image to display.
|
61
73
|
# @param image_alt [String] Alt text for image.
|
62
74
|
# @param description [String] Text that appears below the title. Typically a whole sentence.
|
@@ -87,12 +99,12 @@ module Primer
|
|
87
99
|
large: false,
|
88
100
|
spacious: false,
|
89
101
|
|
90
|
-
**
|
102
|
+
**system_arguments
|
91
103
|
)
|
92
|
-
@
|
93
|
-
@
|
94
|
-
@
|
95
|
-
@
|
104
|
+
@system_arguments = system_arguments
|
105
|
+
@system_arguments[:tag] ||= :div
|
106
|
+
@system_arguments[:classes] = class_names(
|
107
|
+
@system_arguments[:classes],
|
96
108
|
"blankslate",
|
97
109
|
"blankslate-narrow": narrow,
|
98
110
|
"blankslate-large": large,
|
@@ -112,5 +124,18 @@ module Primer
|
|
112
124
|
@link_text = link_text
|
113
125
|
@link_url = link_url
|
114
126
|
end
|
127
|
+
|
128
|
+
class Spinner < Primer::Slot
|
129
|
+
# @param size [Symbol] <%= one_of(Primer::SpinnerComponent::SIZE_MAPPINGS) %>
|
130
|
+
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
|
131
|
+
def initialize(**system_arguments)
|
132
|
+
@system_arguments = system_arguments
|
133
|
+
@system_arguments[:mb] ||= 3
|
134
|
+
end
|
135
|
+
|
136
|
+
def component
|
137
|
+
Primer::SpinnerComponent.new(**@system_arguments)
|
138
|
+
end
|
139
|
+
end
|
115
140
|
end
|
116
141
|
end
|
@@ -1,25 +1,25 @@
|
|
1
|
-
<%= render Primer::BaseComponent.new(**@
|
1
|
+
<%= render Primer::BaseComponent.new(**@system_arguments) do %>
|
2
2
|
<% if header %>
|
3
|
-
<%= render Primer::BaseComponent.new(**header.
|
3
|
+
<%= render Primer::BaseComponent.new(**header.system_arguments) do %>
|
4
4
|
<%= header.content %>
|
5
5
|
<% end %>
|
6
6
|
<% end %>
|
7
7
|
<% if body %>
|
8
|
-
<%= render Primer::BaseComponent.new(**body.
|
8
|
+
<%= render Primer::BaseComponent.new(**body.system_arguments) do %>
|
9
9
|
<%= body.content %>
|
10
10
|
<% end %>
|
11
11
|
<% end %>
|
12
12
|
<% if rows.any? %>
|
13
13
|
<ul>
|
14
14
|
<% rows.each do |row| %>
|
15
|
-
<%= render Primer::BaseComponent.new(**row.
|
15
|
+
<%= render Primer::BaseComponent.new(**row.system_arguments) do %>
|
16
16
|
<%= row.content %>
|
17
17
|
<% end %>
|
18
18
|
<% end %>
|
19
19
|
</ul>
|
20
20
|
<% end %>
|
21
21
|
<% if footer %>
|
22
|
-
<%= render Primer::BaseComponent.new(**footer.
|
22
|
+
<%= render Primer::BaseComponent.new(**footer.system_arguments) do %>
|
23
23
|
<%= footer.content %>
|
24
24
|
<% end %>
|
25
25
|
<% end %>
|
@@ -20,13 +20,13 @@ module Primer
|
|
20
20
|
# component.slot(:footer) { "Footer" }
|
21
21
|
# end %>
|
22
22
|
#
|
23
|
-
# @param
|
24
|
-
def initialize(**
|
25
|
-
@
|
26
|
-
@
|
27
|
-
@
|
23
|
+
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
|
24
|
+
def initialize(**system_arguments)
|
25
|
+
@system_arguments = system_arguments
|
26
|
+
@system_arguments[:tag] = :div
|
27
|
+
@system_arguments[:classes] = class_names(
|
28
28
|
"Box",
|
29
|
-
|
29
|
+
system_arguments[:classes]
|
30
30
|
)
|
31
31
|
end
|
32
32
|
|
@@ -35,53 +35,53 @@ module Primer
|
|
35
35
|
end
|
36
36
|
|
37
37
|
class Header < Primer::Slot
|
38
|
-
attr_reader :
|
39
|
-
# @param
|
40
|
-
def initialize(**
|
41
|
-
@
|
42
|
-
@
|
43
|
-
@
|
38
|
+
attr_reader :system_arguments
|
39
|
+
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
|
40
|
+
def initialize(**system_arguments)
|
41
|
+
@system_arguments = system_arguments
|
42
|
+
@system_arguments[:tag] = :div
|
43
|
+
@system_arguments[:classes] = class_names(
|
44
44
|
"Box-header",
|
45
|
-
|
45
|
+
system_arguments[:classes]
|
46
46
|
)
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
50
|
class Body < Primer::Slot
|
51
|
-
attr_reader :
|
52
|
-
# @param
|
53
|
-
def initialize(**
|
54
|
-
@
|
55
|
-
@
|
56
|
-
@
|
51
|
+
attr_reader :system_arguments
|
52
|
+
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
|
53
|
+
def initialize(**system_arguments)
|
54
|
+
@system_arguments = system_arguments
|
55
|
+
@system_arguments[:tag] = :div
|
56
|
+
@system_arguments[:classes] = class_names(
|
57
57
|
"Box-body",
|
58
|
-
|
58
|
+
system_arguments[:classes]
|
59
59
|
)
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
63
|
class Footer < Primer::Slot
|
64
|
-
attr_reader :
|
65
|
-
# @param
|
66
|
-
def initialize(**
|
67
|
-
@
|
68
|
-
@
|
69
|
-
@
|
64
|
+
attr_reader :system_arguments
|
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(
|
70
70
|
"Box-footer",
|
71
|
-
|
71
|
+
system_arguments[:classes]
|
72
72
|
)
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
76
|
class Row < Primer::Slot
|
77
|
-
attr_reader :
|
78
|
-
# @param
|
79
|
-
def initialize(**
|
80
|
-
@
|
81
|
-
@
|
82
|
-
@
|
77
|
+
attr_reader :system_arguments
|
78
|
+
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
|
79
|
+
def initialize(**system_arguments)
|
80
|
+
@system_arguments = system_arguments
|
81
|
+
@system_arguments[:tag] = :li
|
82
|
+
@system_arguments[:classes] = class_names(
|
83
83
|
"Box-row",
|
84
|
-
|
84
|
+
system_arguments[:classes]
|
85
85
|
)
|
86
86
|
end
|
87
87
|
end
|