Skip to content

Commit

Permalink
fix: better buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Sampiiiii committed Apr 15, 2024
1 parent 3c8f8be commit 1c945ca
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@ui/components/ui/collapsible.tsx";
import { Button } from "@ui/components/ui/button.tsx";
import { ArrowDownIcon, ArrowRightIcon } from "lucide-react";
import { ArrowDownIcon, ArrowRightIcon, Ban } from "lucide-react";
import { FC, useState } from "react";
import type { SignInEntry } from "@ignis/types/sign_in.ts";
import { Alert, AlertDescription, AlertTitle } from "@ui/components/ui/alert.tsx";
Expand Down Expand Up @@ -40,9 +40,15 @@ export const SignInDrawer: FC<SignInDrawerProps> = ({ title, entries, startExpan
onClick={toggleOpen}
disabled={entries.length === 0}
>
{isOpen ? <ArrowDownIcon className="h-4 w-4" /> : <ArrowRightIcon className="h-4 w-4" />}
Toggle
<span className="sr-only">Toggle</span>
{entries.length === 0 ? (
<Ban className="h-4 w-4" />
) : (
<>
{isOpen ? "Hide" : "Show"}
{isOpen ? <ArrowRightIcon className="h-4 w-4" /> : <ArrowDownIcon className="h-4 w-4" />}
<span className="sr-only">{isOpen ? "Hide" : "Show"}</span>
</>
)}
</Button>
</CollapsibleTrigger>
</div>
Expand Down

0 comments on commit 1c945ca

Please sign in to comment.