Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
aerosol committed Jan 25, 2025
1 parent 26f7e48 commit b58079b
Show file tree
Hide file tree
Showing 3 changed files with 284 additions and 195 deletions.
8 changes: 6 additions & 2 deletions lib/plausible_web/live/components/team.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ defmodule PlausibleWeb.Live.Components.Team do
attr :role, :atom, default: nil
attr :my_role, :atom, required: true
attr :disabled, :boolean, default: false
attr :remove_disabled, :boolean, default: false

def member(assigns) do
~H"""
Expand Down Expand Up @@ -80,12 +81,15 @@ defmodule PlausibleWeb.Live.Components.Team do
<.dropdown_divider />
<.dropdown_item
href="#"
disabled={@disabled}
disabled={@disabled or @remove_disabled}
phx-click="remove-member"
phx-value-email={@user.email}
phx-value-name={@user.name}
>
<div class="text-red-600 hover:text-red-600 dark:text-red-500 hover:dark:text-red-400">
<div class={
not @remove_disabled &&
"text-red-600 hover:text-red-600 dark:text-red-500 hover:dark:text-red-400"
}>
Remove member
</div>
<div class="text-gray-500 dark:text-gray-400 text-xs/5">
Expand Down
Loading

0 comments on commit b58079b

Please # to comment.