Skip to content

Commit

Permalink
Show boolean values
Browse files Browse the repository at this point in the history
  • Loading branch information
RobVermeer committed Dec 23, 2023
1 parent 3559bb2 commit 5abdbac
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/Issues/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
import { Button } from "../ui/button"
import { Separator } from "../ui/separator"
import { ScrollArea } from "../ui/scroll-area"
import clsx from "clsx"

interface Props {
projectId?: string
Expand Down Expand Up @@ -129,7 +130,18 @@ export async function Issues({ projectId }: Props) {
{key}
</dt>
<dd className="mt-1 text-sm leading-6 text-muted-foreground sm:col-span-2 sm:mt-0">
{value as string}
{typeof value === "boolean" && (
<span
className={clsx(
"inline-block h-3 w-3 rounded-full ring",
value
? "bg-green-500 ring-green-200"
: "bg-red-500 ring-red-200"
)}
/>
)}

{typeof value !== "boolean" && String(value)}
</dd>
</div>
))}
Expand Down

0 comments on commit 5abdbac

Please sign in to comment.