Skip to content

Commit

Permalink
Merge branch 'release/v0.1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
bopm committed Feb 6, 2024
2 parents 79f6c66 + b2d8160 commit 9faaf38
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
turbo_material (0.1.4)
turbo_material (0.1.5)
importmap-rails (~> 2.0.1)
rails (~> 7.1, >= 7.1.2)
stimulus-rails (~> 1.3)
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ aside.mdc-drawer.main-drawer {
}
```

## Tailwind Forms customizations leakage

This gem uses Tailwind for additional customizations, I am noticed that `@tailwindcss/forms` leaking to Material inputs adding partial white backgrounds. For now I would recommend to disable forms plugin while using this gem.

## Installation
Add this line to your application's Gemfile:

Expand All @@ -230,15 +234,13 @@ $ gem install turbo_material

## Lookbook documentation for components

Gem implements [Lookbook](https://lookbook.build) documentation for all components. I am considering implementing a way to pass it's previews to lookbook in hosting application, but for now, to use it, please checkout gem source code and use it like this:
Gem implements [Lookbook](https://lookbook.build) documentation for all components. To use it in the application, add `gem 'lookbook'` to your Gemfile and run `bundle install`. Then add following to your `config/application.rb`:

```bash
bundle install
cd test/dummy
foreman start -f Procfile.dev
```ruby
config.lookbook.preview_paths = [TurboMaterial::Engine.root.join('lib/lookbook')]
```

and then open [http://localhost:3000/lookbook](http://localhost:3000/lookbook) in your browser.
Or extend your existing config for `lookbook.preview_paths` with same value.

## Contributing
This gem is open for new contributions. Use [Material Components for Web documentation](https://github.com/material-components/material-components-web/tree/master/packages) as a references for missing functionality.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/turbo_material/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module TurboMaterial
VERSION = "0.1.5"
VERSION = "0.1.6"
end
5 changes: 3 additions & 2 deletions test/dummy/app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
<%= csrf_meta_tags %>
<%= csp_meta_tag %>


<link href="//cdn.jsdelivr.net/npm/material-components-web@latest/dist/material-components-web.min.css" rel="stylesheet">
<script src="//cdn.jsdelivr.net/npm/material-components-web@latest/dist/material-components-web.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<%= javascript_importmap_tags %>

<%= stylesheet_link_tag "turbo_material/tailwind.css" %>
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
<%= stylesheet_link_tag "application" %>

<%= javascript_importmap_tags %>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion test/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ class Application < Rails::Application
#
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras")
config.lookbook.preview_paths = ["lookbook"]
config.lookbook.preview_paths = [TurboMaterial::Engine.root.join('lib/lookbook')]
end
end

0 comments on commit 9faaf38

Please sign in to comment.