bulma_view_components 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 +4 -4
- data/app/components/bulma/block_component.rb +9 -0
- data/app/components/bulma/box_component.rb +1 -1
- data/app/components/bulma/tag_component.rb +2 -2
- data/app/components/bulma/title_component.rb +2 -2
- data/app/helpers/bulma/component_helper.rb +13 -0
- data/lib/bulma/view_components/engine.rb +3 -1
- data/lib/bulma/view_components/sizes.rb +0 -1
- data/lib/bulma/view_components/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 173bedbdbd58fa99dbebd27221ae7b0c3c54817d6ebae40241f978f0b9aeb292
|
4
|
+
data.tar.gz: 620da4805fa721af75f643aeffb3058fefccb71c351e25081bd51e037af02e4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50cb77d39282af525b2ca696234ad3db1502c1ef893fc852125e5c9fd24fdf6beaa599eec3ccc5c4328bec56854edf1dc1da2b7bfe29768968a9c6f9209ac0d5
|
7
|
+
data.tar.gz: f65c1476f675ec1ece68e50a1310f11db9c37fe3c4e97f4408195e8aa08bce05aaed50498ccdf1ff21ca2d6603a8716024f507ca39fae80384aee759f850826e
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Bulma
|
4
4
|
class TitleComponent < Component
|
5
5
|
def initialize(as: :h1, size: 1)
|
6
|
-
raise ArgumentError,
|
6
|
+
raise ArgumentError, "invalid value to size" if size > 6
|
7
7
|
|
8
8
|
@as = as
|
9
9
|
@size = size
|
@@ -11,7 +11,7 @@ module Bulma
|
|
11
11
|
|
12
12
|
def call
|
13
13
|
content_tag @as, content, class: class_names(
|
14
|
-
|
14
|
+
"title",
|
15
15
|
"is-#{@size}"
|
16
16
|
)
|
17
17
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bulma
|
4
|
+
# Helper methods for cleaner views.
|
5
|
+
#
|
6
|
+
# These methods are automatically available to views and offer a very thin
|
7
|
+
# layer around the actual components they wrap.
|
8
|
+
module ComponentHelper
|
9
|
+
def bulma_title(*args, **kwargs, &block)
|
10
|
+
render Bulma::TitleComponent.new(*args, **kwargs, &block)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bulma_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diego Toral
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -47,10 +47,12 @@ extra_rdoc_files: []
|
|
47
47
|
files:
|
48
48
|
- LICENSE.txt
|
49
49
|
- README.md
|
50
|
+
- app/components/bulma/block_component.rb
|
50
51
|
- app/components/bulma/box_component.rb
|
51
52
|
- app/components/bulma/component.rb
|
52
53
|
- app/components/bulma/tag_component.rb
|
53
54
|
- app/components/bulma/title_component.rb
|
55
|
+
- app/helpers/bulma/component_helper.rb
|
54
56
|
- lib/bulma/colors.rb
|
55
57
|
- lib/bulma/view_components.rb
|
56
58
|
- lib/bulma/view_components/engine.rb
|