bootstrap_concerns 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bootstrap_concerns/components_helper.rb +14 -0
- data/lib/bootstrap_concerns/option.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e64bd154f92aa9e3c769f9f57374d25c49a96f3b8cc1907f613b4ec5242eee9b
|
4
|
+
data.tar.gz: 273b3b714feb668ca78ea5a0624f3c18d3f9c8305fb41a2e3963df658a4344c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea3e846855b8d90517655ba9d4ba1b4b11587b4e25add9d41f493496f22c017dd43d49625a8815cd8375a70e4c60c4f677f7709c24fdf076091f2a06c414e62a
|
7
|
+
data.tar.gz: '07528556f386a44eef6b9bcb72a3f2c73f2d177148b3d2b22452df4574e48368f1ef84ae559951b96bd9195ccebe0be0bb0154e7373c498993873d352cf4e13e'
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module BootstrapConcerns
|
2
2
|
module ComponentsHelper
|
3
|
+
SEARCH_COL_MARGIN = "mb-3".freeze
|
4
|
+
|
3
5
|
def assign_icon
|
4
6
|
icon("box-arrow-in-left", "Assign")
|
5
7
|
end
|
@@ -39,6 +41,18 @@ module BootstrapConcerns
|
|
39
41
|
bs_link_or_button_to(:link_to, name, options, html_options, &)
|
40
42
|
end
|
41
43
|
|
44
|
+
def bs_search_col(&)
|
45
|
+
content_tag(:div, class: "col-12 col-sm #{SEARCH_COL_MARGIN}", &)
|
46
|
+
end
|
47
|
+
|
48
|
+
def bs_search_submit_col
|
49
|
+
content_tag(:div, class: "col-auto #{SEARCH_COL_MARGIN}") do
|
50
|
+
content_tag(:button, BootstrapConcerns::Option.options_with_button_class) do
|
51
|
+
search_icon
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
42
56
|
def copy_icon
|
43
57
|
icon("files", "Copy")
|
44
58
|
end
|
@@ -4,7 +4,7 @@ module BootstrapConcerns
|
|
4
4
|
DEFAULT_BUTTON_COLOR = "primary".freeze
|
5
5
|
|
6
6
|
class << self
|
7
|
-
def options_with_button_class(options)
|
7
|
+
def options_with_button_class(options = {})
|
8
8
|
color = prefixed_option(options, key: :color, prefix: BUTTON_BASE_CLASS, default: DEFAULT_BUTTON_COLOR)
|
9
9
|
size = prefixed_option(options, key: :size, prefix: BUTTON_BASE_CLASS)
|
10
10
|
options_with_base_class(options, BUTTON_BASE_CLASS, color, size)
|