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
+625 -4910

No files matched your search

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