coveragebook_components 0.7.3 → 0.7.4

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: 287b92ab8ab281433ab11b74dc67dcff72cffd6d2ef1c3e3e03a7b7336f7cb7f
4
- data.tar.gz: fafbf5dca17cc74fe3e7c1c7916ed17ad094283e4c74d551f22ebc087e7faecb
3
+ metadata.gz: 5ceeb25038f15c5dcbad897861b4a34958af3d53819d73f65be9c0d23fd97676
4
+ data.tar.gz: 5a5470debcbe99eb141ed5d058af54ea28075bc71f86a6164c12e58098acfb61
5
5
  SHA512:
6
- metadata.gz: 9b8f37fd4a0af96e03ee70512e55fdf50a28f640e0577557a7b961a59ac05ef75890af415bcdb1cdcc5a205ed46749706c2d04213fdd2fb03a87b972e7beaf7d
7
- data.tar.gz: fb86b8cf5ac533096b0872b11b263b0be7c170ce2ed6c031d543089188db8a0acb82f9c2aa9c9345b87e08e4ab404e66e1790973e2832a14f3460c8fe21b1931
6
+ metadata.gz: d9ac57ebf2f2940aa02ee75f7014f6b1ef7abe5aa80fb4255c6c190efd3430f8ac999faef74ffbe5371d16a0274b1e77114da5429f9b1903138d3c97fea3ad0c
7
+ data.tar.gz: 6c43b9dd2e1515e55299d6c55516fb4f300ed1f7a0cbe9b7cd2dccb7de132b70419dd01c8e1ab0397e72a7b02455fe81ffa5b76ab02c6a729171461c27a05b40
@@ -14032,7 +14032,7 @@
14032
14032
  var package_default = {
14033
14033
  name: "coveragebook-components",
14034
14034
  type: "module",
14035
- version: "0.7.3",
14035
+ version: "0.7.4",
14036
14036
  main: "index.js",
14037
14037
  repository: "git@github.com:coveragebook/coco.git",
14038
14038
  author: "Mark Perkins <mark@coveragebook.com>",
@@ -16,12 +16,14 @@ module Coco
16
16
  end
17
17
 
18
18
  link = Coco::App::Elements::Link.new(href: href, **kwargs)
19
- link = link.with_content(content) unless block
19
+ link = link.with_content(content) if !block && content.present?
20
20
 
21
21
  render(link, &block)
22
22
  end
23
23
 
24
- def coco_button(href = nil, **kwargs, &block)
24
+ def coco_button(*args, **kwargs, &block)
25
+ href, content = args[0..2].reverse!
26
+
25
27
  button = if kwargs.key?(:action) || kwargs.key?(:method) || kwargs.key?(:params)
26
28
  "ButtonTo"
27
29
  else
@@ -43,7 +45,9 @@ module Coco
43
45
  end
44
46
 
45
47
  component = "Coco::App::Elements::#{button}".constantize.new(href: href, **kwargs)
46
- render component, &block
48
+ component = component.with_content(content) if !block && content.present?
49
+
50
+ render(component, &block)
47
51
  end
48
52
 
49
53
  def coco_menu_button(**, &block)
data/lib/coco.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Coco
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coveragebook_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Perkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-03 00:00:00.000000000 Z
11
+ date: 2023-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails