-
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
1 parent
ab37cac
commit c1b3446
Showing
8 changed files
with
63 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,36 @@ | ||
import { Cross2Icon, PlusIcon } from "@radix-ui/react-icons"; | ||
|
||
export default function AdminButton({ | ||
handleCheckboxChange, | ||
isAdmin, | ||
}: { | ||
handleCheckboxChange: () => void; | ||
isAdmin: boolean; | ||
}) { | ||
return isAdmin ? ( | ||
<button | ||
tabIndex={-1} | ||
onClick={handleCheckboxChange} | ||
className="ml-auto flex gap-1 items-center bg-[var(--admin-label-bg)] md:hover:opacity-80 text-[11px] text-[var(--admin-label-text)] px-2 py-1 rounded-[2px] animate-fade-in" | ||
> | ||
Admin <Cross2Icon height={13} width={13} /> | ||
</button> | ||
) : ( | ||
<> | ||
<button | ||
tabIndex={-1} | ||
onClick={handleCheckboxChange} | ||
className="hidden group-focus-visible:hidden md:group-hover:flex items-center md:group-hover:gap-1 ml-auto bg-[var(--admin-set-btn)] md:hover:opacity-80 text-[11px] px-2 py-1 rounded-[2px] animate-fade-in" | ||
> | ||
Set admin <PlusIcon height={13} width={13} /> | ||
</button> | ||
<button | ||
tabIndex={-1} | ||
onClick={handleCheckboxChange} | ||
className="hidden md:group-hover:hidden group-focus-visible:gap-1 group-focus-visible:flex items-center ml-auto bg-[var(--admin-set-btn)] text-[11px] md:hover:opacity-80 px-2 py-1 rounded-[2px] animate-fade-in" | ||
> | ||
Set admin <PlusIcon height={13} width={13} /> | ||
</button> | ||
</> | ||
); | ||
} |
This file was deleted.
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
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