feat: Add more pages
This commit is contained in:
25
src/widgets/CreateButton/index.tsx
Normal file
25
src/widgets/CreateButton/index.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Button } from "@mui/material";
|
||||
import { Plus } from "lucide-react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
interface CreateButtonProps {
|
||||
label: string;
|
||||
path: string;
|
||||
}
|
||||
|
||||
export const CreateButton = ({ label, path }: CreateButtonProps) => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
onClick={() => {
|
||||
navigate(path);
|
||||
}}
|
||||
startIcon={<Plus size={20} />}
|
||||
>
|
||||
{label}
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user