diff options
| author | David Hill <[email protected]> | 2026-01-15 20:35:51 +0000 |
|---|---|---|
| committer | David Hill <[email protected]> | 2026-01-15 20:42:14 +0000 |
| commit | 0f7b17b1b47e127946ec5547ee9669eec5df0f4d (patch) | |
| tree | 542e140424bf71a5766f4c9bd1701c822014f337 /packages/ui/src/components | |
| parent | 4d3e983edb46821727c2e3c5c610414a155b6320 (diff) | |
| download | opencode-0f7b17b1b47e127946ec5547ee9669eec5df0f4d.tar.gz opencode-0f7b17b1b47e127946ec5547ee9669eec5df0f4d.zip | |
fix: thinking animation opacity and design
Diffstat (limited to 'packages/ui/src/components')
| -rw-r--r-- | packages/ui/src/components/spinner.tsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/ui/src/components/spinner.tsx b/packages/ui/src/components/spinner.tsx index b8cc933c8..cc4149d17 100644 --- a/packages/ui/src/components/spinner.tsx +++ b/packages/ui/src/components/spinner.tsx @@ -1,6 +1,7 @@ import { ComponentProps, For } from "solid-js" -const outerIndices = new Set([0, 1, 2, 3, 4, 7, 8, 11, 12, 13, 14, 15]) +const outerIndices = new Set([1, 2, 4, 7, 8, 11, 13, 14]) +const cornerIndices = new Set([0, 3, 12, 15]) const squares = Array.from({ length: 16 }, (_, i) => ({ id: i, x: (i % 4) * 4, @@ -8,6 +9,7 @@ const squares = Array.from({ length: 16 }, (_, i) => ({ delay: Math.random() * 1.5, duration: 1 + Math.random() * 1, outer: outerIndices.has(i), + corner: cornerIndices.has(i), })) export function Spinner(props: { @@ -35,8 +37,11 @@ export function Spinner(props: { height="3" rx="1" style={{ - animation: `${square.outer ? "pulse-opacity-dim" : "pulse-opacity"} ${square.duration}s ease-in-out infinite`, - "animation-delay": `${square.delay}s`, + opacity: square.corner ? 0 : undefined, + animation: square.corner + ? undefined + : `${square.outer ? "pulse-opacity-dim" : "pulse-opacity"} ${square.duration}s ease-in-out infinite`, + "animation-delay": square.corner ? undefined : `${square.delay}s`, }} /> )} |
