mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-06-01 03:22:03 +08:00
- Added Danmaku settings including API URL, opacity, font size, and display area to PlayerSettings. - Improved button styles and transitions across various UI components for better user experience. - Updated BackToTop, Badge, Button, Card, ConfirmDialog, Input, ModalBackdrop, ModalHeader, SegmentedControl, and Switch components for consistency with Liquid Glass design. - Adjusted package versions in package.json and package-lock.json to reflect version 4.5.0.
28 lines
1012 B
TypeScript
28 lines
1012 B
TypeScript
/**
|
|
* Reusable modal header component
|
|
*/
|
|
|
|
interface ModalHeaderProps {
|
|
title: string;
|
|
onClose: () => void;
|
|
}
|
|
|
|
export function ModalHeader({ title, onClose }: ModalHeaderProps) {
|
|
return (
|
|
<div className="flex items-center justify-between mb-6">
|
|
<h3 className="text-xl font-semibold text-[var(--text-color)]">
|
|
{title}
|
|
</h3>
|
|
<button
|
|
onClick={onClose}
|
|
className="w-8 h-8 flex items-center justify-center rounded-[var(--radius-full)] bg-[var(--glass-bg)] border border-[var(--glass-border)] text-[var(--text-color)] hover:bg-[color-mix(in_srgb,var(--accent-color)_10%,transparent)] transition-all duration-200 cursor-pointer"
|
|
aria-label="关闭"
|
|
>
|
|
<svg className="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
<path d="M18 6L6 18M6 6l12 12" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
);
|
|
}
|