mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-13 07:43:43 +08:00
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
/**
|
|
* Header for search history dropdown
|
|
*/
|
|
|
|
import { Icons } from '@/components/ui/Icon';
|
|
|
|
interface SearchHistoryHeaderProps {
|
|
onClearAll: () => void;
|
|
}
|
|
|
|
export function SearchHistoryHeader({ onClearAll }: SearchHistoryHeaderProps) {
|
|
return (
|
|
<div className="search-history-header">
|
|
<div className="flex items-center gap-2">
|
|
<Icons.Clock size={16} className="text-[var(--text-color-secondary)]" />
|
|
<span className="text-sm font-medium text-[var(--text-color-secondary)]">
|
|
搜索历史
|
|
</span>
|
|
</div>
|
|
<button
|
|
type="button"
|
|
onClick={(e) => {
|
|
e.stopPropagation();
|
|
onClearAll();
|
|
}}
|
|
className="text-xs text-[var(--accent-color)] hover:underline transition-all cursor-pointer"
|
|
aria-label="清除所有历史"
|
|
>
|
|
清除全部
|
|
</button>
|
|
</div>
|
|
);
|
|
}
|