turbo_material 0.2.15 → 0.2.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -1
- data/app/assets/dist/turbo_material/tailwind.css +2552 -1
- data/app/assets/javascripts/turbo_material/material_menu_button_controller.js +8 -9
- data/app/helpers/turbo_material/menu_button_helper.rb +5 -3
- data/app/views/components/_menu_button.html.erb +10 -5
- data/config/tailwind.config.js +17 -15
- data/lib/generators/turbo_material/install_generator.rb +79 -0
- data/lib/tasks/install.rake +8 -0
- data/lib/turbo_material/configuration.rb +7 -0
- data/lib/turbo_material/version.rb +1 -1
- data/lib/turbo_material.rb +12 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1623b6bf21bbdba8af1e54604ded65c4ea4b9181fbc39fa5b0e9ebb0c45c3b2b
|
4
|
+
data.tar.gz: f29b6252a029be2dfdd728f88646392f5b34edd6fee7539d9251218aa2b2f8d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c195f9fd7d326e357336992f04fd88751a74546e79675b3aac0a7bf0b7216bae0ec17084051b04de9ea35efed00337c9d274704a1b3ae9d97401f7ba29e70a6
|
7
|
+
data.tar.gz: 77682dd076906ff49f90fd7fef92e7bb81b55467a54e8549248bf841bc213d67a089e8f7ea845176f008b8b2f340d97dda34e3aa6a84b8dc2479eccaf96a7af4
|
data/README.md
CHANGED
@@ -15,6 +15,8 @@ That list is based on the project from which this library is being extracted. If
|
|
15
15
|
|
16
16
|
## Usage
|
17
17
|
|
18
|
+
Run `rails turbo_material:install` to install the gem and add necessary files to your project. Alternatively, you can follow the steps below.
|
19
|
+
|
18
20
|
Add following to your `app/javascript/controllers/index.js` after `eagerLoadControllersFrom("controllers", application)` line:
|
19
21
|
|
20
22
|
```javascript
|
@@ -26,7 +28,6 @@ Add following to your `app/view/layouts/application.html.erb` in `<head>` sectio
|
|
26
28
|
<link href="//cdn.jsdelivr.net/npm/material-components-web@latest/dist/material-components-web.min.css" rel="stylesheet">
|
27
29
|
<script src="//cdn.jsdelivr.net/npm/material-components-web@latest/dist/material-components-web.min.js"></script>
|
28
30
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
29
|
-
<%= stylesheet_link_tag "turbo_material/tailwind.css" %>
|
30
31
|
```
|
31
32
|
|
32
33
|
### Material Components for Web customizations
|
@@ -534,6 +535,12 @@ Implements [Material Design Menu Button](https://github.com/material-components/
|
|
534
535
|
```erb
|
535
536
|
<%= material_menu_button button_text: 'Menu', menu_contents_partial: 'common/menu_contents' %>
|
536
537
|
```
|
538
|
+
or with block
|
539
|
+
```erb
|
540
|
+
<%= material_menu_button button_text: 'Menu' do %>
|
541
|
+
Contents
|
542
|
+
<% end %>
|
543
|
+
```
|
537
544
|
|
538
545
|
#### Options
|
539
546
|
|
@@ -541,6 +548,9 @@ Implements [Material Design Menu Button](https://github.com/material-components/
|
|
541
548
|
| --- | --- | --- |
|
542
549
|
| `button_text` | String | Text of the menu button |
|
543
550
|
| `menu_contents_partial` | String | Partial for menu contents |
|
551
|
+
| `logout_path` | String | Path for logout |
|
552
|
+
| `custom_css` | String | Custom CSS class |
|
553
|
+
| `custom_surface_css` | String | Custom CSS class for the menu surface |
|
544
554
|
|
545
555
|
### Modal
|
546
556
|
|