storybook_engine 1.1.0 → 1.4.1
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/README.md +9 -5
- data/app/assets/stylesheets/storybook_engine/{application.scss → _index.scss} +0 -0
- data/app/components/{storybook_engine → ButtonComponent}/button_component.html.haml +1 -1
- data/app/components/{storybook_engine → ButtonComponent}/button_component.rb +0 -0
- data/app/components/InputComponent/input_component.html.haml +5 -0
- data/app/components/InputComponent/input_component.rb +15 -0
- data/app/components/LabelComponent/label_component.html.haml +2 -0
- data/app/components/LabelComponent/label_component.rb +9 -0
- data/app/components/LinkComponent/link_component.html.haml +2 -0
- data/app/components/LinkComponent/link_component.rb +15 -0
- data/app/views/layouts/storybook_engine/application.html.erb +1 -1
- data/lib/storybook_engine/version.rb +1 -1
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbf3f4af991439ab6661300e932e2ae8e5e4be54497ef35cc06c294c547bffe4
|
4
|
+
data.tar.gz: 0d0fe4abdeeb8492b654760d6b2ca88c65769572c337013b183900a791ec4808
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9312fe1011e90a8a07624c906c338d054139e1764f189f42428e7a175845cc2496ff72f623dc7f67352b5e267fd50fb5276306bf1de3919dfa98d1afb0fefe1
|
7
|
+
data.tar.gz: fdeb4f59bf1099dfd317f719f8b9e9b99883544b5ba8692c9c2dbeeb8655e05c6595036de6584689e58f646b32bfd72744abb339d133ef549d250ae2607ad6a8
|
data/README.md
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
# StorybookEngine
|
2
|
-
|
2
|
+
Storybook with view components rails engine
|
3
3
|
|
4
4
|
## Usage
|
5
|
-
|
6
|
-
|
5
|
+
##### Button
|
6
|
+
```ruby
|
7
|
+
= render(ButtonComponent.new(options: {type: "submit"},classes: "w-100")) { "Save" }
|
8
|
+
```
|
7
9
|
## Installation
|
8
10
|
Add this line to your application's Gemfile:
|
9
11
|
|
@@ -21,8 +23,10 @@ Or install it yourself as:
|
|
21
23
|
$ gem install storybook_engine
|
22
24
|
```
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
+
After add gem please add this line into your applications.scss:
|
27
|
+
```bash
|
28
|
+
@import "storybook_engine/application";
|
29
|
+
```
|
26
30
|
|
27
31
|
## License
|
28
32
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
File without changes
|
@@ -1,2 +1,2 @@
|
|
1
1
|
%button{{class: classes}.merge(@options)}
|
2
|
-
= content
|
2
|
+
= content
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class InputComponent < ViewComponent::Base
|
4
|
+
BASE_CLASSES = "form-control"
|
5
|
+
|
6
|
+
def initialize(options:,classes: '')
|
7
|
+
@options = options
|
8
|
+
@classes = classes
|
9
|
+
end
|
10
|
+
|
11
|
+
def classes
|
12
|
+
"#{@classes} #{BASE_CLASSES}"
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class LinkComponent < ViewComponent::Base
|
4
|
+
BASE_CLASSES = "zenhr-link"
|
5
|
+
|
6
|
+
def initialize(options:, classes: '')
|
7
|
+
@options = options
|
8
|
+
@classes = classes
|
9
|
+
end
|
10
|
+
|
11
|
+
def classes
|
12
|
+
"#{BASE_CLASSES} #{@classes}"
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: storybook_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amr Abu Aza
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -41,13 +41,19 @@ files:
|
|
41
41
|
- README.md
|
42
42
|
- Rakefile
|
43
43
|
- app/assets/config/storybook_engine_manifest.js
|
44
|
-
- app/assets/stylesheets/storybook_engine/
|
44
|
+
- app/assets/stylesheets/storybook_engine/_index.scss
|
45
45
|
- app/assets/stylesheets/storybook_engine/components/_buttons.scss
|
46
46
|
- app/assets/stylesheets/storybook_engine/helpers/_colors.scss
|
47
47
|
- app/assets/stylesheets/storybook_engine/helpers/_common-used.scss
|
48
48
|
- app/assets/stylesheets/storybook_engine/helpers/_mixins.scss
|
49
|
-
- app/components/
|
50
|
-
- app/components/
|
49
|
+
- app/components/ButtonComponent/button_component.html.haml
|
50
|
+
- app/components/ButtonComponent/button_component.rb
|
51
|
+
- app/components/InputComponent/input_component.html.haml
|
52
|
+
- app/components/InputComponent/input_component.rb
|
53
|
+
- app/components/LabelComponent/label_component.html.haml
|
54
|
+
- app/components/LabelComponent/label_component.rb
|
55
|
+
- app/components/LinkComponent/link_component.html.haml
|
56
|
+
- app/components/LinkComponent/link_component.rb
|
51
57
|
- app/controllers/storybook_engine/application_controller.rb
|
52
58
|
- app/helpers/storybook_engine/application_helper.rb
|
53
59
|
- app/jobs/storybook_engine/application_job.rb
|