import { type JSX, splitProps } from 'solid-js'; import { cn } from '../utils/cn'; import { Dynamic } from 'solid-js/web'; export interface TextShimmerProps extends JSX.HTMLAttributes { as?: string; duration?: number; spread?: number; children: JSX.Element; } function TextShimmer(props: TextShimmerProps) { const [local, rest] = splitProps(props, ['as', 'class', 'duration', 'spread', 'children']); const dynamicSpread = () => Math.min(Math.max(local.spread ?? 20, 5), 45); const tag = () => local.as ?? 'span'; return ( {local.children} ); } export { TextShimmer };