railsboot 0.1.0 → 0.2.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ee04f8fbe6e2af98e8f1a8946cc4526e7c963cbad8a03eaa0d141ee21080d45
|
4
|
+
data.tar.gz: f2062e0a8771a407a4bc6f8081bd10b68b6a02f06ab93f97508f1dc8d88545c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2aa0d01a8bad9905639b2eed5e75ebd865095fff0b0bb7aba4fe04eb7dd82c4e593178f27f040700b5f601f08f98b6f581031e44a47c277497dacf1f024777fc
|
7
|
+
data.tar.gz: 7c7ccadd9fdef448c2a25a76fa7e67d3cefe048025b58012de98684b7d26b9bdaf1710e4ed40f19e654feb3428f12d21d77effbf3bff73ff981f4add8bce12f7
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# Railsboot
|
2
|
-
Railsboot is an implementation of the famous Bootstrap CSS framework using Rails View Components.
|
2
|
+
### Railsboot is an implementation of the famous Bootstrap CSS framework using Rails View Components.
|
3
|
+
[](https://github.com/dotruby/railsboot/actions) [](https://badge.fury.io/rb/railsboot)
|
3
4
|
|
4
5
|
## Preview
|
5
6
|
You'll find detailed information on how to use Railsboot on https://railsbootui.com
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Railsboot::ContainerComponent < Railsboot::Component
|
2
|
+
BREAKPOINTS = ["sm", "md", "lg", "xl", "xxl"].freeze
|
3
|
+
DEFAULT_BREAKPOINT = "".freeze
|
4
|
+
|
5
|
+
def initialize(breakpoint: DEFAULT_BREAKPOINT, fluid: false, **html_attributes)
|
6
|
+
@breakpoint = breakpoint
|
7
|
+
@fluid = fluid
|
8
|
+
@html_attributes = html_attributes
|
9
|
+
|
10
|
+
@html_attributes[:class] = class_names(
|
11
|
+
("container-#{breakpoint}" if @breakpoint.in?(BREAKPOINTS)),
|
12
|
+
("container-fluid" if @fluid),
|
13
|
+
("container" if @fluid.blank? && !@breakpoint.in?(BREAKPOINTS)),
|
14
|
+
html_attributes.delete(:class)
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
def call
|
19
|
+
render Railsboot::BaseComponent.new(tag: "div", **@html_attributes) do
|
20
|
+
content
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -11,6 +11,7 @@ module Railsboot
|
|
11
11
|
button_link: "Railsboot::Button::LinkComponent",
|
12
12
|
card: "Railsboot::CardComponent",
|
13
13
|
close_button: "Railsboot::CloseButtonComponent",
|
14
|
+
container: "Railsboot::ContainerComponent",
|
14
15
|
heading: "Railsboot::HeadingComponent",
|
15
16
|
list_group: "Railsboot::ListGroupComponent",
|
16
17
|
modal: "Railsboot::ModalComponent",
|
data/lib/railsboot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railsboot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Schoppmann
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- app/components/railsboot/close_button_component.html.erb
|
106
106
|
- app/components/railsboot/close_button_component.rb
|
107
107
|
- app/components/railsboot/component.rb
|
108
|
+
- app/components/railsboot/container_component.rb
|
108
109
|
- app/components/railsboot/dropdown/action_component.html.erb
|
109
110
|
- app/components/railsboot/dropdown/action_component.rb
|
110
111
|
- app/components/railsboot/dropdown/divider_component.html.erb
|