Skip to content

Commit 484aa8e

Browse files
committed
feat: allow full width header
1 parent a0d7fd7 commit 484aa8e

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
},
6969
"peerDependencies": {
7070
"@edx/frontend-platform": "^7.0.0 || ^8.0.0",
71-
"@openedx/paragon": ">= 21.5.7 < 23.0.0",
71+
"@openedx/paragon": "git+ssh://github.com/open-craft/paragon#rpenido/dist/fal-3820-add-full-width-container-option",
7272
"prop-types": "^15.5.10",
7373
"react": "^16.9.0 || ^17.0.0",
7474
"react-dom": "^16.9.0 || ^17.0.0"

src/studio-header/HeaderBody.jsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const HeaderBody = ({
3737
mainMenuDropdowns,
3838
outlineLink,
3939
searchButtonAction,
40+
full,
4041
}) => {
4142
const intl = useIntl();
4243

@@ -51,7 +52,7 @@ const HeaderBody = ({
5152
);
5253

5354
return (
54-
<Container size="xl" className="px-2.5">
55+
<Container size={full ? undefined : 'xl'} className="px-2.5">
5556
<ActionRow as="header">
5657
{isHiddenMainMenu ? (
5758
<Row className="flex-nowrap ml-4">
@@ -155,6 +156,7 @@ HeaderBody.propTypes = {
155156
})),
156157
outlineLink: PropTypes.string,
157158
searchButtonAction: PropTypes.func,
159+
full: PropTypes.bool,
158160
};
159161

160162
HeaderBody.defaultProps = {
@@ -174,6 +176,7 @@ HeaderBody.defaultProps = {
174176
mainMenuDropdowns: [],
175177
outlineLink: null,
176178
searchButtonAction: null,
179+
full: false,
177180
};
178181

179182
export default HeaderBody;

src/studio-header/StudioHeader.jsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ensureConfig([
1616
], 'Studio Header component');
1717

1818
const StudioHeader = ({
19-
number, org, title, isHiddenMainMenu, mainMenuDropdowns, outlineLink, searchButtonAction,
19+
number, org, title, full, isHiddenMainMenu, mainMenuDropdowns, outlineLink, searchButtonAction,
2020
}) => {
2121
const { authenticatedUser, config } = useContext(AppContext);
2222
const props = {
@@ -25,6 +25,7 @@ const StudioHeader = ({
2525
number,
2626
org,
2727
title,
28+
full,
2829
username: authenticatedUser?.username,
2930
isAdmin: authenticatedUser?.administrator,
3031
authenticatedUserAvatar: authenticatedUser?.avatar,
@@ -53,6 +54,7 @@ StudioHeader.propTypes = {
5354
number: PropTypes.string,
5455
org: PropTypes.string,
5556
title: PropTypes.string.isRequired,
57+
full: PropTypes.bool,
5658
isHiddenMainMenu: PropTypes.bool,
5759
mainMenuDropdowns: PropTypes.arrayOf(PropTypes.shape({
5860
id: PropTypes.string,
@@ -69,6 +71,7 @@ StudioHeader.propTypes = {
6971
StudioHeader.defaultProps = {
7072
number: '',
7173
org: '',
74+
full: false,
7275
isHiddenMainMenu: false,
7376
mainMenuDropdowns: [],
7477
outlineLink: null,

0 commit comments

Comments
 (0)