railsboot 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e03b1033fe356b40d6f9e1d7b39e739240186dc66781d5d4d1c843bf341466dc
4
- data.tar.gz: 9855fd58d10806d2c35371e5ffc4b562be2ef39c23b5f7c083e81d93eb57749e
3
+ metadata.gz: 7ee04f8fbe6e2af98e8f1a8946cc4526e7c963cbad8a03eaa0d141ee21080d45
4
+ data.tar.gz: f2062e0a8771a407a4bc6f8081bd10b68b6a02f06ab93f97508f1dc8d88545c4
5
5
  SHA512:
6
- metadata.gz: 262471240b239e5fc8af3abe6db458f8734a187d84c8d991a409fbbb8de914a62d24c40af8ec78bb250839bba985a18a46074f70bcfdd04a87358b0747327389
7
- data.tar.gz: 4c7dc4f046a0bdd71b4802e2327c8d9aff68f1b6937ccb9409f171cc002d57dc9e93365f022411371a892f2e9c43b0fbfb83cd691df12c753d9a47b48e2e57f6
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
+ [![CI](https://github.com/dotruby/railsboot/workflows/CI/badge.svg)](https://github.com/dotruby/railsboot/actions) [![Gem Version](https://badge.fury.io/rb/railsboot.svg)](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",
@@ -1,3 +1,3 @@
1
1
  module Railsboot
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.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-06-10 00:00:00.000000000 Z
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