2025-03-01 21:56:21 +05:30
|
|
|
import { Stack, Typography } from "@mui/material";
|
2025-09-27 14:54:55 -07:00
|
|
|
import ConfigBox from "@/Components/v1/ConfigBox/index.jsx";
|
2025-03-01 21:56:21 +05:30
|
|
|
import PropTypes from "prop-types";
|
2025-03-01 22:43:35 +05:30
|
|
|
import { useTheme } from "@emotion/react";
|
2025-03-01 21:56:21 +05:30
|
|
|
|
|
|
|
|
// This can be used to add any extra/additional section/stacks on top of existing sections on the tab
|
2025-03-03 09:16:25 +05:30
|
|
|
const ConfigStack = ({ title, description, children }) => {
|
2025-03-01 22:43:35 +05:30
|
|
|
const theme = useTheme();
|
|
|
|
|
return (
|
|
|
|
|
<ConfigBox>
|
|
|
|
|
<Stack gap={theme.spacing(6)}>
|
2025-05-27 09:10:32 -07:00
|
|
|
<Typography
|
|
|
|
|
component="h2"
|
|
|
|
|
variant="h2"
|
|
|
|
|
>
|
|
|
|
|
{title}
|
|
|
|
|
</Typography>
|
2025-03-01 22:43:35 +05:30
|
|
|
<Typography component="p">{description}</Typography>
|
|
|
|
|
</Stack>
|
|
|
|
|
{children}
|
|
|
|
|
</ConfigBox>
|
|
|
|
|
);
|
|
|
|
|
};
|
2025-03-01 21:56:21 +05:30
|
|
|
|
2025-03-03 09:16:25 +05:30
|
|
|
ConfigStack.propTypes = {
|
2025-03-01 21:56:21 +05:30
|
|
|
title: PropTypes.string.isRequired, // Title must be a string and is required
|
|
|
|
|
description: PropTypes.string.isRequired, // Description must be a string and is required
|
|
|
|
|
children: PropTypes.node.isRequired,
|
|
|
|
|
};
|
|
|
|
|
|
2025-03-03 09:16:25 +05:30
|
|
|
export default ConfigStack;
|