Files
leonpan-assets/src/component/Common/StyledFormControl.tsx

22 lines
460 B
TypeScript
Raw Normal View History

2025-10-19 13:31:11 +00:00
import { Box, Typography } from "@mui/material";
export interface StyledFormControlProps {
title?: React.ReactNode;
children: React.ReactNode;
}
const StyledFormControl = ({ title, children }: StyledFormControlProps) => {
return (
<Box>
{title && (
<Typography fontWeight={600} sx={{ mb: 0.5 }} variant={"body2"}>
{title}
</Typography>
)}
{children}
</Box>
);
};
export default StyledFormControl;