mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-20 16:39:07 -05:00
36 lines
742 B
TypeScript
36 lines
742 B
TypeScript
import Stack from "@mui/material/Stack";
|
|
import { Button } from "@/Components/v2/Inputs";
|
|
import { useTheme } from "@mui/material/styles";
|
|
import { useTranslation } from "react-i18next";
|
|
import { useNavigate } from "react-router";
|
|
export const HeaderCreate = ({
|
|
label,
|
|
isLoading,
|
|
path,
|
|
}: {
|
|
label?: string;
|
|
isLoading: boolean;
|
|
path: string;
|
|
}) => {
|
|
const theme = useTheme();
|
|
const { t } = useTranslation();
|
|
const navigate = useNavigate();
|
|
return (
|
|
<Stack
|
|
direction="row"
|
|
justifyContent="end"
|
|
alignItems="center"
|
|
gap={theme.spacing(6)}
|
|
>
|
|
<Button
|
|
loading={isLoading}
|
|
variant="contained"
|
|
color="accent"
|
|
onClick={() => navigate(path)}
|
|
>
|
|
{label || t("createNew")}
|
|
</Button>
|
|
</Stack>
|
|
);
|
|
};
|