Skip to content

Commit 4a36ba0

Browse files
feat: add chat-indicator component
1 parent 319cd40 commit 4a36ba0

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

components/demos/ChatIndicator.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Container } from '../docs/container';
2+
import { ChatIndicator } from '../livekit/chat-indicator';
3+
4+
export default function ChatIndicatorDemo() {
5+
return (
6+
<Container componentName="ChatIndicator">
7+
<ChatIndicator />
8+
</Container>
9+
);
10+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { type VariantProps, cva } from 'class-variance-authority';
2+
import { cn } from '@/lib/utils';
3+
4+
export const chatIndicatorVariants = cva([
5+
'inline-block size-2.5 animate-pulse rounded-full',
6+
'bg-muted-foreground',
7+
]);
8+
9+
export interface ChatIndicatorProps extends VariantProps<typeof chatIndicatorVariants> {
10+
className?: string;
11+
}
12+
13+
export function ChatIndicator({ className }: ChatIndicatorProps) {
14+
return <span className={cn(chatIndicatorVariants(), className)} />;
15+
}

0 commit comments

Comments
 (0)