Skip to content
Permalink
Browse files

Fix h1 content in examples file (#140)

* Fix h1 content in examples file
* Use @component.title in examples templates generator
* Add komponent-title class to h1
  • Loading branch information...
Spone authored and nicolas-brousse committed Apr 2, 2019
1 parent 3aed172 commit 762afa1d9c9ab86eec0bf8f3d4664c3814fcbc15
@@ -6,7 +6,7 @@
- Dropped support for Ruby 2.3 and 2.4
- It's now recommended to use eager loading to prevent `uninitialized component` issues
(see [#121](https://github.com/komposable/komponent/issues/121) for background).

The install generator has been updated. When upgrading, please make sure you replace:

config.autoload_paths << config.root.join("app/frontend/components")
@@ -19,6 +19,9 @@
- Support for Rails 6
- Refactoring to use `Utils` in `InstallGenerator` and prevent code duplication

**Bug fixes:**
- Fixed empty `h1` in generated `_examples.html.*` file

## v3.0.0.beta1 (2019-02-28)

**Breaking changes:**
@@ -1,3 +1,3 @@
<h1><%= @component_name %></h1>
<h1 class="komponent-title"><%%= @component.title %></h1>

<%%= cdoc "<%= component_name %>" %>
@@ -1,3 +1,3 @@
%h1 <%= @component_name %>
%h1.komponent-title= @component.title

= cdoc "<%= component_name %>"
@@ -1,3 +1,3 @@
h1 <%= @component_name %>
h1.komponent-title= @component.title

= cdoc "<%= component_name %>"
@@ -31,8 +31,6 @@ def component_path(component_name)
private

def create_examples_view_file(component_name)
@component_name = split_name(component_name).last.underscore

template "examples.html.#{template_engine}.erb", component_path(component_name) + "_examples.html.#{template_engine}"
end
end

0 comments on commit 762afa1

Please sign in to comment.
You can’t perform that action at this time.