Files
KVideo/components/ui/Badge.tsx
T
kuekhaoyang a7480fb47a feat: add MobileVideoPlayer component with advanced controls and hooks
- Implemented MobileVideoPlayer component for mobile video playback.
- Added features such as play/pause, skip forward/backward, volume control, and fullscreen support.
- Integrated double-tap gesture handling for skipping video.
- Included hooks for screen orientation management and mobile detection.
- Enhanced user experience with loading indicators and playback speed options.
2025-11-18 12:40:50 +08:00

32 lines
837 B
TypeScript

import React from 'react';
interface BadgeProps {
children: React.ReactNode;
variant?: 'primary' | 'secondary';
className?: string;
}
export function Badge({ children, variant = 'primary', className = '' }: BadgeProps) {
const variants = {
primary: "bg-[var(--accent-color)] text-white shadow-[var(--shadow-sm)]",
secondary: "bg-[var(--glass-bg)] backdrop-blur-[10px] [-webkit-backdrop-filter:blur(10px)] border border-[var(--glass-border)] text-[var(--text-color)]",
};
return (
<span
className={`
inline-flex items-center justify-center
px-2 py-0.5 md:px-3 md:py-1
rounded-[var(--radius-full)]
text-[10px] md:text-xs font-semibold
transition-all duration-200
${variants[variant]}
${className}
`}
>
{children}
</span>
);
}