Skip to content

Commit

Permalink
fix: add defaultProps to containerProps
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Sep 19, 2024
1 parent ce107bf commit 836e8a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/studio-header/HeaderBody.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ HeaderBody.propTypes = {
})),
outlineLink: PropTypes.string,
searchButtonAction: PropTypes.func,
containerProps: Container.propTypes,
containerProps: PropTypes.shape(Container.propTypes),
};

HeaderBody.defaultProps = {
Expand All @@ -184,6 +184,7 @@ HeaderBody.defaultProps = {
mainMenuDropdowns: [],
outlineLink: null,
searchButtonAction: null,
containerProps: {},
};

export default HeaderBody;
3 changes: 2 additions & 1 deletion src/studio-header/StudioHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ StudioHeader.propTypes = {
number: PropTypes.string,
org: PropTypes.string,
title: PropTypes.string.isRequired,
containerProps: HeaderBody.propTypes.containerProps,
containerProps: PropTypes.shape(HeaderBody.propTypes.containerProps),
isHiddenMainMenu: PropTypes.bool,
mainMenuDropdowns: PropTypes.arrayOf(PropTypes.shape({
id: PropTypes.string,
Expand All @@ -71,6 +71,7 @@ StudioHeader.propTypes = {
StudioHeader.defaultProps = {
number: '',
org: '',
containerProps: {},
isHiddenMainMenu: false,
mainMenuDropdowns: [],
outlineLink: null,
Expand Down

0 comments on commit 836e8a7

Please sign in to comment.