39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import React from "react";
|
|
import { Card, CardContent, CardHeader, CardTitle, CardDescription, CardFooter} from "@/components/ui/card";
|
|
|
|
type Props = {
|
|
title?: string;
|
|
description?: string;
|
|
children?: React.ReactNode;
|
|
headerAction?: React.ReactNode;
|
|
footer?: React.ReactNode;
|
|
};
|
|
|
|
export function UserListTemplate({ title, description, children, headerAction, footer }: Props) {
|
|
return (
|
|
<div className="w-full px-6 space-y-6">
|
|
<div className="flex items-center justify-between">
|
|
<div>
|
|
<h1 className="text-3xl font-bold">{title}</h1>
|
|
{description && <div className="text-muted-foreground mt-2">{description}</div>}
|
|
</div>
|
|
<div>{headerAction}</div>
|
|
</div>
|
|
|
|
<Card className="w-full">
|
|
<CardHeader>
|
|
<div>
|
|
<CardTitle className="flex items-center gap-2">Danh sách người dùng</CardTitle>
|
|
{description && <CardDescription>{description}</CardDescription>}
|
|
</div>
|
|
</CardHeader>
|
|
|
|
<CardContent>{children}</CardContent>
|
|
{footer && <CardFooter>{footer}</CardFooter>}
|
|
</Card>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default UserListTemplate;
|