Skip to content

Commit 3b9230d

Browse files
committed
feat: allow full width footer
1 parent 8d9178f commit 3b9230d

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
},
6666
"peerDependencies": {
6767
"@edx/frontend-platform": "^7.0.0 || ^8.0.0",
68-
"@openedx/paragon": ">= 21.11.3 < 23.0.0",
68+
"@openedx/paragon": "git+ssh://github.com/open-craft/paragon#0e0a66a794fbb6ccf61f7afa9264e096f132cd1b",
6969
"prop-types": "^15.5.10",
7070
"react": "^16.9.0 || ^17.0.0",
7171
"react-dom": "^16.9.0 || ^17.0.0"

src/components/studio-footer/StudioFooter.jsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useContext, useState } from 'react';
22
import _ from 'lodash';
3-
import { intlShape, injectIntl, FormattedMessage } from '@edx/frontend-platform/i18n';
3+
import { useIntl, FormattedMessage } from '@edx/frontend-platform/i18n';
44
import { ensureConfig } from '@edx/frontend-platform';
55
import { AppContext } from '@edx/frontend-platform/react';
66
import {
@@ -12,6 +12,8 @@ import {
1212
TransitionReplace,
1313
} from '@openedx/paragon';
1414
import { ExpandLess, ExpandMore, Help } from '@openedx/paragon/icons';
15+
import propTypes from 'prop-types';
16+
1517
import messages from './messages';
1618

1719
ensureConfig([
@@ -26,9 +28,9 @@ ensureConfig([
2628
], 'Studio Footer component');
2729

2830
const StudioFooter = ({
29-
// injected
30-
intl,
31+
full,
3132
}) => {
33+
const intl = useIntl();
3234
const [isOpen, setIsOpen] = useState(false);
3335
const { config } = useContext(AppContext);
3436

@@ -49,7 +51,7 @@ const StudioFooter = ({
4951
</Button>
5052
<div className="col border-top ml-2" />
5153
</div>
52-
<Container size="xl" className="px-4">
54+
<Container size={full ? undefined : 'xl'} className="px-4">
5355
<TransitionReplace>
5456
{isOpen ? (
5557
<ActionRow key="help-link-button-row" className="py-4" data-testid="helpButtonRow">
@@ -139,8 +141,11 @@ const StudioFooter = ({
139141
};
140142

141143
StudioFooter.propTypes = {
142-
// injected
143-
intl: intlShape.isRequired,
144+
full: propTypes.bool,
145+
};
146+
147+
StudioFooter.defaultProps = {
148+
full: false,
144149
};
145150

146-
export default injectIntl(StudioFooter);
151+
export default StudioFooter;

0 commit comments

Comments
 (0)