Buckets:
| import { Show } from "solid-js" | |
| import { useTheme } from "../context/theme" | |
| import { useKV } from "../context/kv" | |
| import type { JSX } from "@opentui/solid" | |
| import type { RGBA } from "@opentui/core" | |
| import "opentui-spinner/solid" | |
| export const SPINNER_FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"] | |
| export function Spinner(props: { children?: JSX.Element; color?: RGBA }) { | |
| const { theme } = useTheme() | |
| const kv = useKV() | |
| const color = () => props.color ?? theme.textMuted | |
| return ( | |
| <Show when={kv.get("animations_enabled", true)} fallback={<text fg={color()}>⋯ {props.children}</text>}> | |
| <box flexDirection="row" gap={1}> | |
| <spinner frames={SPINNER_FRAMES} interval={80} color={color()} /> | |
| <Show when={props.children}> | |
| <text fg={color()}>{props.children}</text> | |
| </Show> | |
| </box> | |
| </Show> | |
| ) | |
| } | |
Xet Storage Details
- Size:
- 885 Bytes
- Xet hash:
- 92f1eeb9a2b98917eec252ae32635f9bee752e09d2651a26b56c58459caa035e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.