type for tsc

This commit is contained in:
Manav Rathi 2024-05-25 06:34:13 +05:30
parent 0379216e05
commit d51fb99fd3
No known key found for this signature in database

View file

@ -6,12 +6,17 @@ import {
Typography,
type DialogProps,
} from "@mui/material";
import React from "react";
const DialogTitleWithCloseButton = (props) => {
const { children, onClose, ...other } = props;
interface DialogTitleWithCloseButtonProps {
onClose: () => void;
}
const DialogTitleWithCloseButton: React.FC<
React.PropsWithChildren<DialogTitleWithCloseButtonProps>
> = ({ children, onClose }) => {
return (
<DialogTitle {...other}>
<DialogTitle>
<SpaceBetweenFlex>
<Typography variant="h3" fontWeight={"bold"}>
{children}