remove defautl empty string props

This commit is contained in:
Alex Holliday committed 2025-02-23 17:47:02 -08:00
1 parent 77ca3e1ecd
commit 946bfaf16c
2 files changed
+630 -4915

No files matched your search

+601 -4883
View File
File diff suppressed because it is too large. Load diff
+29 -32
View File
@@ -20,26 +20,24 @@ import { RowContainer } from "../StandardContainer";
* @returns {JSX.Element} The rendered component * @returns {JSX.Element} The rendered component
*/ */
const SubHeader = ({ const SubHeader = ({
headerText='', headerText,
headerLevel = 1, headerLevel = 1,
subHeaderText = '', subHeaderText,
subHeaderLevel = 1 , subHeaderLevel = 1,
rightCatagoryTitle = '', rightCatagoryTitle,
rightCatagoryTitleLevel = 2, rightCatagoryTitleLevel = 2,
rightDescription='', rightDescription,
rightDescriptionLevel = 2 rightDescriptionLevel = 2,
}) => { }) => {
const theme = useTheme(); const theme = useTheme();
return ( return (
<Stack <Stack
direction="row" direction="row"
justifyContent="space-between" justifyContent="space-between"
> >
<Stack <Stack direction={"column"}>
direction={"column"}
>
<Typography <Typography
component={`h${headerLevel}`} component={`h${headerLevel}`}
variant={`h${headerLevel}`} variant={`h${headerLevel}`}
@@ -60,33 +58,32 @@ const SubHeader = ({
{subHeaderText} {subHeaderText}
</Typography> </Typography>
</Stack> </Stack>
{rightCatagoryTitle && {rightCatagoryTitle && (
<RowContainer sx={{ width: "20%" }}> <RowContainer sx={{ width: "20%" }}>
<Stack> <Stack>
<Typography variant={`body${rightCatagoryTitleLevel}`}>{rightCatagoryTitle}</Typography> <Typography variant={`body${rightCatagoryTitleLevel}`}>
{rightCatagoryTitle}
</Typography>
<Typography variant={`h${rightDescriptionLevel}`}> <Typography variant={`h${rightDescriptionLevel}`}>
{rightDescription} {rightDescription}
</Typography> </Typography>
</Stack> </Stack>
</RowContainer> </RowContainer>
} )}
</Stack> </Stack>
); );
}; };
SubHeader.propTypes = { SubHeader.propTypes = {
headerText:PropTypes.string, headerText: PropTypes.string,
headerLevel : PropTypes.number , headerLevel: PropTypes.number,
subHeaderText :PropTypes.string, subHeaderText: PropTypes.string,
subHeaderLevel : PropTypes.number, subHeaderLevel: PropTypes.number,
rightCatagoryTitle :PropTypes.string, rightCatagoryTitle: PropTypes.string,
rightCatagoryTitleLevel : PropTypes.number, rightCatagoryTitleLevel: PropTypes.number,
rightDescription:PropTypes.string, rightDescription: PropTypes.string,
rightDescriptionLevel : PropTypes.number rightDescriptionLevel: PropTypes.number,
}; };
export default SubHeader; export default SubHeader;