Files
KVideo/components/search/SourceBadges.tsx
T
kuekhaoyang 5df494e8c8 feat: enhance MobileVideoPlayer with improved control responsiveness and progress seeking
refactor: clean up SourceBadges component by removing unused elements
refactor: update useDoubleTap hook to support continuous skipping in skip mode
2025-11-18 12:52:58 +08:00

39 lines
820 B
TypeScript

'use client';
import { Card } from '@/components/ui/Card';
import { Badge } from '@/components/ui/Badge';
import { Icons } from '@/components/ui/Icon';
interface Source {
id: string;
name: string;
count: number;
}
interface SourceBadgesProps {
sources: Source[];
className?: string;
}
export function SourceBadges({ sources, className = '' }: SourceBadgesProps) {
if (sources.length === 0) {
return null;
}
return (
<Card hover={false} className={`p-4 ${className}`}>
<div className="flex items-center gap-2 flex-wrap">
{sources.map((source) => (
<Badge
key={source.id}
variant="secondary"
className="text-xs"
>
{source.name} ({source.count})
</Badge>
))}
</div>
</Card>
);
}