railwind 0.1.24 → 0.1.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/railwind/generators/progress_generator.rb +12 -0
- data/lib/railwind/generators/templates/progress/_progress_component.html.erb +17 -0
- data/lib/railwind/generators/templates/progress/progress_component.rb +6 -0
- data/lib/railwind/version.rb +1 -1
- data/lib/railwind.rb +2 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85f1ad6b80de9ce7f54fa24193750d0eaa04ba4d45c770e21621146883ba3594
|
4
|
+
data.tar.gz: bc108d03b6be068224ed227bc4160589b022957744e3afd2294b26b2cee2cacc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff81827ad27518d6982ede30e184e40b9376fa13dda8ecdb5a19d706b61ca993cd1e7c6973d5675634984168ca0bbe5ee02195ac31a512149ab9fa2488b92039
|
7
|
+
data.tar.gz: 8cbdeb310acbd900cb88c40712631e1d0a0623d4cc1171d08a4a8188577a99fa7389c87c1735ab3839ef2a4ce2507b65b2617bf59a4e59afc50e78843e1f4536
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Railwind
|
4
|
+
class ProgressGenerator < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('templates', __dir__)
|
6
|
+
|
7
|
+
def create_component_file
|
8
|
+
copy_file "progress/progress_component.rb", "app/components/progress_component.rb"
|
9
|
+
copy_file "progress/_progress_component.html.erb", "app/components/progress_component.html.erb"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="relative w-full">
|
2
|
+
<div class="flex mb-2 items-center justify-between">
|
3
|
+
<div>
|
4
|
+
<span class="text-xs font-semibold inline-block py-1 px-2 uppercase rounded-full text-zinc-600 bg-zinc-200">
|
5
|
+
<%= @label %>
|
6
|
+
</span>
|
7
|
+
</div>
|
8
|
+
<div class="text-right">
|
9
|
+
<span class="text-xs font-semibold inline-block text-zinc-600"><%= @value %>%</span>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<div class="overflow-hidden h-2 mb-4 text-xs flex rounded bg-zinc-200">
|
13
|
+
<div
|
14
|
+
class="shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-zinc-600"
|
15
|
+
style="width: <%= @value %>%" ></div>
|
16
|
+
</div>
|
17
|
+
</div>
|
data/lib/railwind/version.rb
CHANGED
data/lib/railwind.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "railwind/version"
|
4
|
+
|
5
|
+
require_relative "railwind/generators/progress_generator"
|
4
6
|
require_relative "railwind/generators/button_generator"
|
5
7
|
require_relative "railwind/generators/card_generator"
|
6
8
|
require_relative "railwind/generators/tab_generator"
|
7
9
|
require_relative "railwind/generators/callout_generator"
|
8
|
-
require_relative "railwind/generators/progress_generator"
|
9
10
|
|
10
11
|
module Railwind
|
11
12
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railwind
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Bryant
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- lib/railwind/generators/button_generator.rb
|
58
58
|
- lib/railwind/generators/callout_generator.rb
|
59
59
|
- lib/railwind/generators/card_generator.rb
|
60
|
+
- lib/railwind/generators/progress_generator.rb
|
60
61
|
- lib/railwind/generators/tab_generator.rb
|
61
62
|
- lib/railwind/generators/templates/button/_button_component.html.erb
|
62
63
|
- lib/railwind/generators/templates/button/button_component.rb
|
@@ -64,6 +65,8 @@ files:
|
|
64
65
|
- lib/railwind/generators/templates/callout/callout_component.rb
|
65
66
|
- lib/railwind/generators/templates/card/_card_component.html.erb
|
66
67
|
- lib/railwind/generators/templates/card/card_component.rb
|
68
|
+
- lib/railwind/generators/templates/progress/_progress_component.html.erb
|
69
|
+
- lib/railwind/generators/templates/progress/progress_component.rb
|
67
70
|
- lib/railwind/generators/templates/tabs/_tab_component.html.erb
|
68
71
|
- lib/railwind/generators/templates/tabs/tab_component.rb
|
69
72
|
- lib/railwind/generators/templates/tabs/tabs_controller.js
|