railwind 0.1.12 → 0.1.15
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 674e82eb61752a36f11767cc9b2913b22859bd47c1a286951f156f38dfeb7b4f
|
4
|
+
data.tar.gz: f9d0378bc8d270c4d72074e81b85767ba6e682a10797e8543055285f6e31c069
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5d61e8dfa5a66a9610c6e9903804d5cb0c156e01300823fbdd18a581d303b24c6252a01278aaa899f3ec598aa61826a052739f880665b90183a3bb10ba68ba6
|
7
|
+
data.tar.gz: 9e348ef0d5027de7b59270784809270c9be406063000054c705fa30152a5dd28bdd8db62fa392323eacf9969ae7a81041800468a70ee2a42f5386dd5ec07000f
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Railwind
|
4
|
+
class ButtonGenerator < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('templates', __dir__)
|
6
|
+
|
7
|
+
def create_component_file
|
8
|
+
copy_file "button_component.rb", "app/components/button_component.rb"
|
9
|
+
copy_file "_button_component.html.erb", "app/components/button_component.html.erb"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<% base_classes =
|
2
|
+
"px-4 py-2 rounded-full transition hover:opacity-90 hover:shadow border-2 font-semibold"
|
3
|
+
variant_classes =
|
4
|
+
case @variant
|
5
|
+
when "primary"
|
6
|
+
"border-black bg-black text-white"
|
7
|
+
when "secondary"
|
8
|
+
"border-gray-500 bg-gray-500 text-white"
|
9
|
+
when "outline"
|
10
|
+
"border-gray-500 text-gray-500"
|
11
|
+
when "ghost"
|
12
|
+
"border-transparent bg-transparent text-gray-500 hover:bg-gray-200"
|
13
|
+
when "danger"
|
14
|
+
"border-red-500 bg-red-500 text-white"
|
15
|
+
else
|
16
|
+
"bg-blue-500 text-white"
|
17
|
+
end
|
18
|
+
tailwind_classes = "#{base_classes} #{variant_classes}" %>
|
19
|
+
|
20
|
+
<button type="<%= @type %>" class="<%= tailwind_classes %>">
|
21
|
+
<%= @text %>
|
22
|
+
<%= content %>
|
23
|
+
</button>
|
data/lib/railwind/version.rb
CHANGED
data/railwind.gemspec
CHANGED
@@ -9,23 +9,24 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ["hi@christianlovescode.com"]
|
10
10
|
|
11
11
|
spec.summary = "a customizeable ViewComponent UI library baked with Tailwind CSS."
|
12
|
-
spec.description = "Railwind is a customizable ViewComponent UI library that leverages the power of Tailwind CSS. It provides a set of reusable and configurable UI components that can be easily integrated into any Rails application. With Railwind, developers can rapidly build beautiful and responsive user interfaces with less effort and time."
|
13
|
-
spec.homepage = "https://
|
12
|
+
spec.description = "<COMING SOON> Railwind is a customizable ViewComponent UI library that leverages the power of Tailwind CSS. It provides a set of reusable and configurable UI components that can be easily integrated into any Rails application. With Railwind, developers can rapidly build beautiful and responsive user interfaces with less effort and time."
|
13
|
+
spec.homepage = "https://github.com/christianlovescode/railwind"
|
14
14
|
spec.license = "MIT"
|
15
15
|
spec.required_ruby_version = ">= 3.2.0"
|
16
16
|
|
17
17
|
# spec.metadata["allowed_push_host"] = "https://christianbryant.dev"
|
18
18
|
|
19
19
|
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
-
spec.metadata["source_code_uri"] = "https://github.com/christianlovescode"
|
21
|
-
spec.metadata["changelog_uri"] = "https://
|
20
|
+
spec.metadata["source_code_uri"] = "https://github.com/christianlovescode/railwind"
|
21
|
+
spec.metadata["changelog_uri"] = "https://github.com/christianlovescode/railwind"
|
22
22
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
24
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
25
|
spec.files = Dir.chdir(__dir__) do
|
26
26
|
`git ls-files -z`.split("\x0").reject do |f|
|
27
27
|
(File.expand_path(f) == __FILE__) ||
|
28
|
-
f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
|
28
|
+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile]) ||
|
29
|
+
f.end_with?('.gem') # Exclude any .gem files
|
29
30
|
end
|
30
31
|
end
|
31
32
|
spec.bindir = "exe"
|
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.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Bryant
|
@@ -38,11 +38,11 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3.0'
|
41
|
-
description: Railwind is a customizable ViewComponent UI library that
|
42
|
-
power of Tailwind CSS. It provides a set of reusable and configurable
|
43
|
-
that can be easily integrated into any Rails application. With Railwind,
|
44
|
-
can rapidly build beautiful and responsive user interfaces with less
|
45
|
-
time.
|
41
|
+
description: "<COMING SOON> Railwind is a customizable ViewComponent UI library that
|
42
|
+
leverages the power of Tailwind CSS. It provides a set of reusable and configurable
|
43
|
+
UI components that can be easily integrated into any Rails application. With Railwind,
|
44
|
+
developers can rapidly build beautiful and responsive user interfaces with less
|
45
|
+
effort and time."
|
46
46
|
email:
|
47
47
|
- hi@christianlovescode.com
|
48
48
|
executables: []
|
@@ -54,16 +54,19 @@ files:
|
|
54
54
|
- README.md
|
55
55
|
- Rakefile
|
56
56
|
- lib/railwind.rb
|
57
|
+
- lib/railwind/generators/button_generator.rb
|
58
|
+
- lib/railwind/generators/templates/_button_component.html.erb
|
59
|
+
- lib/railwind/generators/templates/button_component.rb
|
57
60
|
- lib/railwind/version.rb
|
58
61
|
- railwind.gemspec
|
59
62
|
- sig/railwind.rbs
|
60
|
-
homepage: https://
|
63
|
+
homepage: https://github.com/christianlovescode/railwind
|
61
64
|
licenses:
|
62
65
|
- MIT
|
63
66
|
metadata:
|
64
|
-
homepage_uri: https://
|
65
|
-
source_code_uri: https://github.com/christianlovescode
|
66
|
-
changelog_uri: https://
|
67
|
+
homepage_uri: https://github.com/christianlovescode/railwind
|
68
|
+
source_code_uri: https://github.com/christianlovescode/railwind
|
69
|
+
changelog_uri: https://github.com/christianlovescode/railwind
|
67
70
|
post_install_message:
|
68
71
|
rdoc_options: []
|
69
72
|
require_paths:
|