memos/web/src/components/MemoMetadata/MetadataSection.tsx
2026-04-02 22:30:21 +08:00

24 lines
822 B
TypeScript

import type { LucideIcon } from "lucide-react";
import type { PropsWithChildren } from "react";
import { cn } from "@/lib/utils";
import SectionHeader, { type SectionHeaderTab } from "./SectionHeader";
interface MetadataSectionProps extends PropsWithChildren {
icon: LucideIcon;
title: string;
count: number;
tabs?: SectionHeaderTab[];
className?: string;
contentClassName?: string;
}
const MetadataSection = ({ icon, title, count, tabs, className, contentClassName, children }: MetadataSectionProps) => {
return (
<div className={cn("w-full overflow-hidden rounded-lg border border-border bg-muted/20", className)}>
<SectionHeader icon={icon} title={title} count={count} tabs={tabs} />
<div className={contentClassName}>{children}</div>
</div>
);
};
export default MetadataSection;