ui: the invert disc's half is actually filled — and the demos match

Lucide's Contrast leaves its half-moon unfilled (fill=none default) -
the owner's catch. Hand-rolled InvertDiscIcon: same geometry, the half
carries fill=currentColor, so the filled side is filled. The demo cards
get the identical disc + 'Invert colors' tooltip on their invert
toggles, matching the figures.
This commit is contained in:
amosblomqvist
2026-10-08 19:13:54 +03:00
parent 1beb54d3d2
commit d790384b72
4 changed files with 40 additions and 3 deletions
+8 -1
View File
@@ -3,6 +3,7 @@
import { useContext, useEffect, useMemo, useRef, useState } from "react";
import { DownloadIcon } from "lucide-react";
import { Toggle } from "@/components/settings/controls";
import { InvertDiscIcon } from "@/components/artifacts/invert-disc";
import { ChatActionsContext } from "@/components/chat";
import { downloadFile, slugFilename } from "@/components/artifacts/download";
import { DispatchCard } from "@/components/artifacts/dispatch-card";
@@ -181,7 +182,13 @@ function DemoFrame({
<span className="truncate text-xs font-medium tracking-wide text-foreground">{title}</span>
</div>
<div className="flex shrink-0 items-center gap-1.5">
<Toggle checked={inverted} onChange={toggleInverted} label="Invert demo brightness" />
<Toggle
checked={inverted}
onChange={toggleInverted}
label="Invert demo brightness"
title="Invert colors"
discIcon={<InvertDiscIcon className="size-3" />}
/>
<button
type="button"
aria-label="Download demo as HTML"