mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-07-02 18:43:08 +08:00
refactor: add primitives, plan mode display, and new session model selector
This commit is contained in:
26
src/shared/view/ui/Shimmer.tsx
Normal file
26
src/shared/view/ui/Shimmer.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import { cn } from '../../../lib/utils';
|
||||
|
||||
interface ShimmerProps {
|
||||
children: string;
|
||||
className?: string;
|
||||
as?: React.ElementType;
|
||||
}
|
||||
|
||||
const Shimmer = React.memo<ShimmerProps>(({ children, className, as: Component = 'span' }) => {
|
||||
return (
|
||||
<Component
|
||||
className={cn(
|
||||
'animate-shimmer inline-block bg-[length:250%_100%] bg-clip-text text-transparent',
|
||||
'bg-[linear-gradient(90deg,transparent_33%,hsl(var(--foreground))_50%,transparent_67%),linear-gradient(hsl(var(--muted-foreground)),hsl(var(--muted-foreground)))]',
|
||||
className
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</Component>
|
||||
);
|
||||
});
|
||||
Shimmer.displayName = 'Shimmer';
|
||||
|
||||
export { Shimmer };
|
||||
Reference in New Issue
Block a user