合同初步可以访问
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { TemplateCard } from './TemplateCard';
|
||||
|
||||
interface Template {
|
||||
id: string;
|
||||
title: string;
|
||||
type: string;
|
||||
description: string;
|
||||
updateTime: string;
|
||||
useCount: number;
|
||||
rating: number;
|
||||
category: string;
|
||||
}
|
||||
|
||||
interface TemplateGridProps {
|
||||
templates: Template[];
|
||||
viewMode: 'grid' | 'list';
|
||||
onTemplateClick: (templateId: string) => void;
|
||||
}
|
||||
|
||||
export function TemplateGrid({ templates, viewMode, onTemplateClick }: TemplateGridProps) {
|
||||
return (
|
||||
<div className={`template-grid ${viewMode === 'list' ? 'list-view' : ''}`}>
|
||||
{templates.map((template) => (
|
||||
<TemplateCard
|
||||
key={template.id}
|
||||
template={template}
|
||||
onClick={() => onTemplateClick(template.id)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user