add copy to clipboard for invites

This commit is contained in:
2022-02-15 19:50:48 -05:00
parent 6c3867f9a8
commit 0b0e1cc639
8 changed files with 78 additions and 25 deletions

View File

@ -25,8 +25,14 @@ defmodule CanneryWeb.Components.InviteCard do
</h2>
<% end %>
<code class="text-xs px-4 py-2 rounded-lg text-gray-100 bg-primary-800"><%= Routes.user_registration_url(Endpoint, :new, invite: @invite.token) %>
</code>
<div class="flex flex-row justify-center items-center space-x-4">
<code id={"code-#{@invite.id}"} class="text-xs px-4 py-2 rounded-lg text-gray-100 bg-primary-800"><%= Routes.user_registration_url(Endpoint, :new, invite: @invite.token) %>
</code>
<%= if @code_actions do %>
<%= render_slot(@code_actions) %>
<% end %>
</div>
<%= if @inner_block do %>
<div class="flex space-x-4 justify-center items-center">