primer_view_components 0.0.11 → 0.0.16
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/README.md +3 -1
- data/app/components/primer/avatar_component.rb +11 -11
- data/app/components/primer/base_component.rb +101 -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/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 +13 -13
- 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 +8 -8
- 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 +26 -26
- data/app/components/primer/progress_bar_component.html.erb +2 -2
- data/app/components/primer/progress_bar_component.rb +14 -14
- data/app/components/primer/spinner_component.html.erb +1 -1
- data/app/components/primer/spinner_component.rb +12 -11
- 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/lib/primer/classify.rb +7 -6
- data/lib/primer/view_components/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa20e643699f825d7867ba90c89def4cb5a4718782a55e1c7f7442cf8544732c
|
4
|
+
data.tar.gz: 4f01e3f6a5a2418b9318362820f08c37ad0dcc420aa62d55e12016f7e56b7e88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02be1d647c02508fbc4fb7fd9339d221b7625a5fe047c2e14e5901d809e8c4edbffb1559f4c06dbbb95971e6697b76acd8b096f60087d14941dcddf20c58ff87
|
7
|
+
data.tar.gz: 265ee51bd35a72bb183df848780a9d47b3203a06bb77ee53f7cfb606897785175bc347d48082bd7a0286081235155c4dae4c702fa752dc863342017a1a254d39
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,44 @@
|
|
2
2
|
|
3
3
|
## main
|
4
4
|
|
5
|
+
## 0.0.16
|
6
|
+
|
7
|
+
* Adding a `spinner` slot to the `BlankslateComponent` that uses the `SpinnerComponent` added in `0.0.10`.
|
8
|
+
|
9
|
+
*Jon Rohan*
|
10
|
+
|
11
|
+
* Bumping node engine to version `15.x`
|
12
|
+
|
13
|
+
*Jon Rohan*
|
14
|
+
|
15
|
+
## 0.0.15
|
16
|
+
|
17
|
+
* Add ability to disable `limit` on Counter.
|
18
|
+
|
19
|
+
*Christian Giordano*
|
20
|
+
|
21
|
+
* Rename `v` system argument to `visibility`.
|
22
|
+
|
23
|
+
*Joel Hawksley*
|
24
|
+
|
25
|
+
## 0.0.14
|
26
|
+
|
27
|
+
* Add functional colors to Label.
|
28
|
+
|
29
|
+
*Joel Hawksley*
|
30
|
+
|
31
|
+
## 0.0.13
|
32
|
+
|
33
|
+
* Add support for `xl` breakpoint.
|
34
|
+
|
35
|
+
*Joel Hawksley*
|
36
|
+
|
37
|
+
## 0.0.12
|
38
|
+
|
39
|
+
* Adds support for disabling inline box-sizing style for `SpinnerComponent` via style parameter `Primer::SpinnerComponent.new(style: nil)`.
|
40
|
+
|
41
|
+
*Chris Wilson*
|
42
|
+
|
5
43
|
## 0.0.11
|
6
44
|
|
7
45
|
* Renames DetailsComponent::OVERLAY_DEFAULT to DetailsComponent::NO_OVERLAY to more correctly describe its value.
|
@@ -82,7 +120,7 @@
|
|
82
120
|
|
83
121
|
## 0.0.3
|
84
122
|
|
85
|
-
* Add support for responsive `float`
|
123
|
+
* Add support for responsive `float` system argument.
|
86
124
|
|
87
125
|
*Joel Hawksley*
|
88
126
|
|
data/README.md
CHANGED
@@ -8,7 +8,9 @@
|
|
8
8
|
|
9
9
|
_Note: This library is in pre-release development and should not be considered stable._
|
10
10
|
|
11
|
-
|
11
|
+
## Documentation
|
12
|
+
|
13
|
+
Visit [https://primer.style/view-components/](https://primer.style/view-components//) to view documentation.
|
12
14
|
|
13
15
|
## License
|
14
16
|
|
@@ -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,114 @@
|
|
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
|
+
# | `hidden` | `Boolean` | Whether to assign the `hidden` attribute. |
|
5
38
|
class BaseComponent < Primer::Component
|
6
39
|
TEST_SELECTOR_TAG = :test_selector
|
7
|
-
|
40
|
+
# @param test_selector [String] Adds `data-test-selector='given value'` in non-Production environments for testing purposes.
|
41
|
+
#
|
42
|
+
# @param m [Integer] Margin. <%= one_of((-6..6).to_a) %>
|
43
|
+
# @param mt [Integer] Margin left. <%= one_of((-6..6).to_a) %>
|
44
|
+
# @param mr [Integer] Margin right. <%= one_of((-6..6).to_a) %>
|
45
|
+
# @param mb [Integer] Margin bottom. <%= one_of((-6..6).to_a) %>
|
46
|
+
# @param ml [Integer] Margin left. <%= one_of((-6..6).to_a) %>
|
47
|
+
# @param mx [Integer] Horizontal margins. <%= one_of((-6..6).to_a + [:auto]) %>
|
48
|
+
# @param my [Integer] Vertical margins. <%= one_of((-6..6).to_a) %>
|
49
|
+
# @param p [Integer] Padding. <%= one_of((0..6).to_a) %>
|
50
|
+
# @param pt [Integer] Padding left. <%= one_of((0..6).to_a) %>
|
51
|
+
# @param pr [Integer] Padding right. <%= one_of((0..6).to_a) %>
|
52
|
+
# @param pb [Integer] Padding bottom. <%= one_of((0..6).to_a) %>
|
53
|
+
# @param pl [Integer] Padding left. <%= one_of((0..6).to_a) %>
|
54
|
+
# @param px [Integer] Horizontal padding. <%= one_of((0..6).to_a) %>
|
55
|
+
# @param py [Integer] Vertical padding. <%= one_of((0..6).to_a) %>
|
56
|
+
#
|
57
|
+
# @param position [Symbol] <%= one_of([:relative, :absolute, :fixed]) %>
|
58
|
+
#
|
59
|
+
# @param top [Boolean] If `false`, sets `top: 0`.
|
60
|
+
# @param right [Boolean] If `false`, sets `right: 0`.
|
61
|
+
# @param bottom [Boolean] If `false`, sets `bottom: 0`.
|
62
|
+
# @param left [Boolean] If `false`, sets `left: 0`.
|
63
|
+
#
|
64
|
+
# @param display [Symbol] <%= one_of([:block, :none, :inline, :inline_block, :table, :table_cell]) %>
|
65
|
+
#
|
66
|
+
# @param v [Symbol] Visibility. <%= one_of([:hidden, :visible]) %>
|
67
|
+
#
|
68
|
+
# @param hide [Symbol] Hide the element at a specific breakpoint. <%= one_of([:sm, :md, :lg, :xl]) %>
|
69
|
+
#
|
70
|
+
# @param vertical_align [Symbol] <%= one_of([:baseline, :top, :middle, :bottom, :text_top, :text_bottom]) %>
|
71
|
+
#
|
72
|
+
# @param float [Symbol] <%= one_of([:left, :right]) %>
|
73
|
+
#
|
74
|
+
# @param col [Integer] Number of columns.
|
75
|
+
#
|
76
|
+
# @param underline [Boolean] Whether text should be underlined.
|
77
|
+
#
|
78
|
+
# @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.
|
79
|
+
# @param bg [String, Symbol] Background color. Accepts either a hex value as a String or a color name as a Symbol.
|
80
|
+
#
|
81
|
+
# @param box_shadow [Boolean, Symbol] Box shadow. <%= one_of([true, :medium, :large, :extra_large, :none]) %>
|
82
|
+
# @param border [Symbol] <%= one_of([:left, :top, :bottom, :right, :y, :x]) %>
|
83
|
+
# @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.
|
84
|
+
# @param border_top [Integer] Set to `0` to remove the top border.
|
85
|
+
# @param border_bottom [Integer] Set to `0` to remove the bottom border.
|
86
|
+
# @param border_left [Integer] Set to `0` to remove the left border.
|
87
|
+
# @param border_right [Integer] Set to `0` to remove the right border.
|
88
|
+
#
|
89
|
+
# @param font_size [String, Integer] <%= one_of(["00", 0, 1, 2, 3, 4, 5, 6]) %>
|
90
|
+
# @param text_align [Symbol] Text alignment. <%= one_of([:left, :right, :center]) %>
|
91
|
+
# @param font_weight [Symbol] Font weight. <%= one_of([:light, :normal, :bold]) %>
|
92
|
+
#
|
93
|
+
# @param flex [Integer, Symbol] <%= one_of([1, :auto]) %>
|
94
|
+
# @param flex_grow [Integer] To enable, set to `0`.
|
95
|
+
# @param flex_shrink [Integer] To enable, set to `0`.
|
96
|
+
# @param align_self [Symbol] <%= one_of([:auto, :start, :end, :center, :baseline, :stretch]) %>
|
97
|
+
# @param justify_content [Symbol] <%= one_of([:flex_start, :flex_end, :center, :space_between, :space_around]) %>
|
98
|
+
# @param align_items [Symbol] <%= one_of([:flex_start, :flex_end, :center, :baseline, :stretch]) %>
|
99
|
+
# @param width [Symbol] <%= one_of([:fit, :fill]) %>
|
100
|
+
# @param height [Symbol] <%= one_of([:fit, :fill]) %>
|
8
101
|
#
|
9
|
-
# @
|
10
|
-
# <%= render(Primer::BaseComponent.new(tag: :a, href: "http://www.google.com", mt: 4)) { "Link" } %>
|
102
|
+
# @param word_break [Symbol] Whether to break words on line breaks. Can only be `:break_all`.
|
11
103
|
#
|
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, **
|
104
|
+
# @param tag [Symbol] HTML tag name to be passed to `tag.send`.
|
105
|
+
# @param classes [String] CSS class name value to be concatenated with generated Primer CSS classes.
|
106
|
+
def initialize(tag:, classes: nil, **system_arguments)
|
15
107
|
@tag = tag
|
16
|
-
@result = Primer::Classify.call(**
|
108
|
+
@result = Primer::Classify.call(**system_arguments.merge(classes: classes))
|
17
109
|
|
18
110
|
# Filter out Primer keys so they don't get assigned as HTML attributes
|
19
|
-
@content_tag_args = add_test_selector(
|
111
|
+
@content_tag_args = add_test_selector(system_arguments).except(*Primer::Classify::VALID_KEYS)
|
20
112
|
end
|
21
113
|
|
22
114
|
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
|