From 3b9230d7eadc12b4a9db01898b05e56303ae181b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Thu, 5 Sep 2024 14:45:48 -0300 Subject: [PATCH] feat: allow full width footer --- package-lock.json | 2 +- package.json | 2 +- src/components/studio-footer/StudioFooter.jsx | 19 ++++++++++++------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef58c5ddb..9b9778755 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ }, "peerDependencies": { "@edx/frontend-platform": "^7.0.0 || ^8.0.0", - "@openedx/paragon": ">= 21.11.3 < 23.0.0", + "@openedx/paragon": "git+ssh://github.com/open-craft/paragon#0e0a66a794fbb6ccf61f7afa9264e096f132cd1b", "prop-types": "^15.5.10", "react": "^16.9.0 || ^17.0.0", "react-dom": "^16.9.0 || ^17.0.0" diff --git a/package.json b/package.json index 52766797a..026ef4d58 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ }, "peerDependencies": { "@edx/frontend-platform": "^7.0.0 || ^8.0.0", - "@openedx/paragon": ">= 21.11.3 < 23.0.0", + "@openedx/paragon": "git+ssh://github.com/open-craft/paragon#0e0a66a794fbb6ccf61f7afa9264e096f132cd1b", "prop-types": "^15.5.10", "react": "^16.9.0 || ^17.0.0", "react-dom": "^16.9.0 || ^17.0.0" diff --git a/src/components/studio-footer/StudioFooter.jsx b/src/components/studio-footer/StudioFooter.jsx index 81add577d..e0bc470f4 100644 --- a/src/components/studio-footer/StudioFooter.jsx +++ b/src/components/studio-footer/StudioFooter.jsx @@ -1,6 +1,6 @@ import React, { useContext, useState } from 'react'; import _ from 'lodash'; -import { intlShape, injectIntl, FormattedMessage } from '@edx/frontend-platform/i18n'; +import { useIntl, FormattedMessage } from '@edx/frontend-platform/i18n'; import { ensureConfig } from '@edx/frontend-platform'; import { AppContext } from '@edx/frontend-platform/react'; import { @@ -12,6 +12,8 @@ import { TransitionReplace, } from '@openedx/paragon'; import { ExpandLess, ExpandMore, Help } from '@openedx/paragon/icons'; +import propTypes from 'prop-types'; + import messages from './messages'; ensureConfig([ @@ -26,9 +28,9 @@ ensureConfig([ ], 'Studio Footer component'); const StudioFooter = ({ - // injected - intl, + full, }) => { + const intl = useIntl(); const [isOpen, setIsOpen] = useState(false); const { config } = useContext(AppContext); @@ -49,7 +51,7 @@ const StudioFooter = ({
- + {isOpen ? ( @@ -139,8 +141,11 @@ const StudioFooter = ({ }; StudioFooter.propTypes = { - // injected - intl: intlShape.isRequired, + full: propTypes.bool, +}; + +StudioFooter.defaultProps = { + full: false, }; -export default injectIntl(StudioFooter); +export default StudioFooter;