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
+622 -4907

No files matched your search

+601 -4883
View File
File diff suppressed because it is too large. Load diff
+21 -24
View File
@@ -21,15 +21,15 @@ import { RowContainer } from "../StandardContainer";
*/
const SubHeader = ({
headerText='',
headerText,
headerLevel = 1,
subHeaderText = '',
subHeaderLevel = 1 ,
rightCatagoryTitle = '',
subHeaderText,
subHeaderLevel = 1,
rightCatagoryTitle,
rightCatagoryTitleLevel = 2,
rightDescription='',
rightDescriptionLevel = 2
}) => {
rightDescription,
rightDescriptionLevel = 2,
}) => {
const theme = useTheme();
return (
@@ -37,9 +37,7 @@ const SubHeader = ({
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;