-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
35 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
module TurboMaterial | ||
module MenuButtonHelper | ||
def material_menu_button(kwargs = {}) | ||
render "components/menu_button", **kwargs | ||
module MenuButtonHelper | ||
def material_menu_button(kwargs = {}, &block) | ||
render "components/menu_button", **kwargs do | ||
capture(&block) if block_given? | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
<%# locals: (button_text:, menu_contents_partial:) %> | ||
<div data-controller="material-menu-button" class="!z-100"> | ||
<%# locals: (button_text:, menu_contents_partial: nil, logout_path: nil, custom_css: '!z-100', custom_surface_css: '') %> | ||
<div data-controller="material-menu-button" class="<%= custom_css %>" | ||
data-material-menu-button-logout-path-value="<%= logout_path %>"> | ||
<button class="mdc-button mdc-button--touch menu-item menu-button" | ||
data-action="click->material-menu-button#click"> | ||
data-action="click->material-menu-button#toggleMenu"> | ||
<span class="mdc-button__ripple"></span> | ||
<span class="mdc-button__focus-ring"></span> | ||
<span class="mdc-button__label flex items-center"> | ||
<span class="hidden lg:inline"><%= button_text %></span> | ||
<span class="material-icons">expand_more</span> | ||
</span> | ||
</button> | ||
<div class="mdc-menu mdc-menu-surface !w-auto"> | ||
<%= render partial: menu_contents_partial %> | ||
<div class="mdc-menu mdc-menu-surface <%= custom_surface_css %>"> | ||
<%- if block_given? -%> | ||
<%= yield %> | ||
<%- else -%> | ||
<%= render partial: menu_contents_partial %> | ||
<% end %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module TurboMaterial | ||
VERSION = "0.2.15" | ||
VERSION = "0.2.16" | ||
end |