polaris_view_helpers 0.0.5 → 0.0.6

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
  SHA1:
3
- metadata.gz: 161d564f644bf953820e86a5d0597a35ff618b4b
4
- data.tar.gz: 089eac353984a5679fd99da2687d095af1182a69
3
+ metadata.gz: b6732f56e6d1b7c94672051a46ac947cb5ecc32c
4
+ data.tar.gz: b1cf9eaa54881cdb49aafef1b922a71a7b6c7394
5
5
  SHA512:
6
- metadata.gz: 8a21667a767d715a2fd4461a526f173826f8053cb6b3296e5dd6d53a8cbc1f9b307b5241e89ca29d3e70f27b8956fc09fec40a135dae1b19e52222c971a3cd30
7
- data.tar.gz: d17ae234153ec6a931ec4941715aba0435ec10774f02b2d9b0bc340714317180d4e331ce885f372649a8069cf9857bc62216f90e0c1532ac717d1e8edd9f6977
6
+ metadata.gz: c2cd9f7834297106118e4e66ce7dd33af23c1e809674043fdefd732ec78d9a10d19338b791eb01153e91bd8fbd70b04f0fa2eff8aa8fb84805421cfec78a5095
7
+ data.tar.gz: 9001c7815b0737807d9c5b21f2930987008bc9085b696cbd4545514e39429641e292e2d996425115760da865a38237443242de6865899a4285f973ee89c9d168
@@ -0,0 +1,7 @@
1
+ <li role="presentation" class="Polaris-Tabs__TabContainer">
2
+ <%= link_to link_path, class: "Polaris-Tabs__Tab #{'Polaris-Tabs__Tab--selected' if active}" do %>
3
+ <span class="Polaris-Tabs__Title"><%= text %></span>
4
+ <% end %>
5
+ </li>
6
+
7
+
@@ -0,0 +1,3 @@
1
+ <ul role="tablist" class="Polaris-Tabs">
2
+ <%= capture(&block) %>
3
+ </ul>
@@ -1,6 +1,27 @@
1
1
  module PolarisViewHelpers
2
2
  module Helper
3
3
 
4
+ def polaris_tabs(&block)
5
+ render(
6
+ partial: 'polaris/tabs',
7
+ locals: { block: block }
8
+ )
9
+ end
10
+
11
+ def polaris_tab(text, link_path, active = nil)
12
+ unless active.present?
13
+ active = link_path == request.original_fullpath
14
+ end
15
+ render(
16
+ partial: 'polaris/tab',
17
+ locals: {
18
+ text: text,
19
+ link_path: link_path,
20
+ active: active
21
+ }
22
+ )
23
+ end
24
+
4
25
  def polaris_banner(options, &block)
5
26
  render(
6
27
  partial: 'polaris/banner',
@@ -1,3 +1,3 @@
1
1
  module PolarisViewHelpers
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polaris_view_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Green
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-09 00:00:00.000000000 Z
11
+ date: 2017-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -60,6 +60,8 @@ files:
60
60
  - app/views/polaris/_form_layout_item_select.html.erb
61
61
  - app/views/polaris/_model_errors.html.erb
62
62
  - app/views/polaris/_page_actions.html.erb
63
+ - app/views/polaris/_tab.html.erb
64
+ - app/views/polaris/_tabs.html.erb
63
65
  - app/views/polaris/banner_icons/_critical.html.erb
64
66
  - app/views/polaris/banner_icons/_success.html.erb
65
67
  - app/views/polaris/banner_icons/_warning.html.erb