-
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
devguilhermeribeiro
committed
Nov 10, 2024
1 parent
9a9d444
commit 43bc62f
Showing
7 changed files
with
42 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<%= button_to @name, @path, method: @method %> |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
class ButtonToComponent < ViewComponent::Base | ||
def initialize(name, path, method) | ||
@name = name | ||
@path = path | ||
@method = method | ||
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,7 +1,11 @@ | ||
<%= tag.header class: "header" do %> | ||
<%= tag.h1 do %> | ||
<%= link_to "Barber Agenda", @path %> | ||
<% end %> | ||
<%= tag.header class: "fixed top-0 left-0 z-50 w-full p-12 mb-16" do %> | ||
<nav class="flex flex-row justify-between"> | ||
<%= tag.h1 do %> | ||
<%= link_to "Barber Agenda", @path %> | ||
<% end %> | ||
|
||
<%= content %> | ||
<div> | ||
<%= content %> | ||
</div> | ||
</nav> | ||
<% 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 +1,11 @@ | ||
<div>Add Navbar::Navbar template here</div> | ||
<div data-controller="dropdown"> | ||
<button data-action="dropdown#toggle"><%= @resource ? @resource.email : "Barber Agenda" %></button> | ||
|
||
<ul class="hidden" data-dropdown-target="menu"> | ||
<% @links.each do |link| %> | ||
<li><%= link_to link[:name], link[:path] %></li> | ||
<% end %> | ||
|
||
<%= content %> | ||
</ul> | ||
</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,4 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
class Navbar::NavbarComponent < ViewComponent::Base | ||
class NavbarComponent < ViewComponent::Base | ||
def initialize(links: [], resource: nil) | ||
@links = links | ||
@resource = resource | ||
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<%= form_with(url: search_path) do %> | ||
|
||
<% 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# frozen_string_literal: true | ||
|
||
class SearchFormComponent < ViewComponent::Base | ||
end |