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 b54ec5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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;
2 changes: 2 additions & 0 deletions src/studio-header/StudioHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import Responsive from 'react-responsive';
import { AppContext } from '@edx/frontend-platform/react';
import { ensureConfig } from '@edx/frontend-platform';
import { Container } from '@openedx/paragon';

Check failure on line 6 in src/studio-header/StudioHeader.jsx

View workflow job for this annotation

GitHub Actions / tests (18)

'Container' is defined but never used

Check failure on line 6 in src/studio-header/StudioHeader.jsx

View workflow job for this annotation

GitHub Actions / tests (20)

'Container' is defined but never used

import MobileHeader from './MobileHeader';
import HeaderBody from './HeaderBody';
Expand Down Expand Up @@ -71,6 +72,7 @@ StudioHeader.propTypes = {
StudioHeader.defaultProps = {
number: '',
org: '',
containerProps: {},
isHiddenMainMenu: false,
mainMenuDropdowns: [],
outlineLink: null,
Expand Down

0 comments on commit b54ec5a

Please sign in to comment.