From d51fb99fd31a42a42e1699ae4addaa77f055e8bc Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sat, 25 May 2024 06:34:13 +0530 Subject: [PATCH] type for tsc --- .../components/DialogBox/TitleWithCloseButton.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web/packages/shared/components/DialogBox/TitleWithCloseButton.tsx b/web/packages/shared/components/DialogBox/TitleWithCloseButton.tsx index 54ed1486d9..35304b9cf0 100644 --- a/web/packages/shared/components/DialogBox/TitleWithCloseButton.tsx +++ b/web/packages/shared/components/DialogBox/TitleWithCloseButton.tsx @@ -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 +> = ({ children, onClose }) => { return ( - + {children}