Upgrade Rails to 7.1, update dependencies, require Ruby 3.x #160

Merged
raucao merged 36 commits from chore/update_dependencies into master 2024-02-27 18:56:59 +00:00
3 changed files with 35 additions and 5 deletions
Showing only changes of commit fcda3b9c8c - Show all commits

View File

@ -2,13 +2,21 @@
<div class="relative inline-block">
<div role="button" tabindex="0" data-dropdown-target="button"
class="inline-block select-none">
<% if @size == :large %>
<span class="appearance-none flex items-center inline-block">
<span class="p-2 bg-gray-50 hover:bg-gray-100 rounded-full">
<%= render partial: "icons/kebab-menu", locals: {
custom_class: "inline text-gray-500 h-6 w-6"
} %>
<%= render partial: "icons/#{@icon_name}",
locals: { custom_class: "inline text-gray-500 h-6 w-6" } %>
</span>
</span>
<% elsif @size == :small %>
<span class="appearance-none flex items-center inline-block">
<span class="text-gray-500 hover:text-blue-600">
<%= render partial: "icons/#{@icon_name}",
locals: { custom_class: "inline h-4 w-4" } %>
</span>
</span>
<% end %>
</div>
<div data-dropdown-target="menu"
data-transition-enter="transition ease-out duration-200"

View File

@ -1,5 +1,8 @@
# frozen_string_literal: true
class DropdownComponent < ViewComponent::Base
def initialize(size: :large, icon_name: "kebap-menu")
@size = size.to_sym
@icon_name = icon_name
end
end

View File

@ -43,7 +43,26 @@
<tr>
<th>Invitations available</th>
<td>
<%= @user.invitations.count %>
<div class="flex justify-between">
<span>
<%= @user.invitations.count %>
</span>
<span>
<%= render DropdownComponent.new(size: :small, icon_name: "edit") do %>
<%= render DropdownLinkComponent.new(
href: ""
) do %>
Add more
<% end %>
<%= render DropdownLinkComponent.new(
href: "",
separator: true, add_class: "text-red-700"
) do %>
Remove all
<% end %>
<% end %>
</span>
</div>
</td>
</tr>
<tr>