diff --git a/src/Components/Subheader/index.jsx b/src/Components/Subheader/index.jsx index 12e802a78..a76696567 100644 --- a/src/Components/Subheader/index.jsx +++ b/src/Components/Subheader/index.jsx @@ -8,6 +8,7 @@ import { Stack, Typography } from "@mui/material"; * @component * @example * + * @param {boolean} props.shouldRender - Whether to render the subheader * @param {string} props.direction - Direction of the subheader * @param {string} props.headerText - Header text * @param {number} props.headerLevel - Font characteristic of the header @@ -19,6 +20,7 @@ import { Stack, Typography } from "@mui/material"; */ const SubHeader = ({ + shouldRender = true, direction = "row", headerText, headerLevel = 1, @@ -29,6 +31,11 @@ const SubHeader = ({ ...props }) => { const theme = useTheme(); + + if (!shouldRender) { + return null; + } + return ( { /> 0} direction={{ s: "column", md: "row" }} headerText={t("distributedStatusServerMonitors")} subHeaderText={t("distributedStatusServerMonitorsDescription")}