1
1
import React , { useContext , useState } from 'react' ;
2
2
import _ from 'lodash' ;
3
- import { intlShape , injectIntl , FormattedMessage } from '@edx/frontend-platform/i18n' ;
3
+ import { useIntl , FormattedMessage } from '@edx/frontend-platform/i18n' ;
4
4
import { ensureConfig } from '@edx/frontend-platform' ;
5
5
import { AppContext } from '@edx/frontend-platform/react' ;
6
6
import {
@@ -12,6 +12,8 @@ import {
12
12
TransitionReplace ,
13
13
} from '@openedx/paragon' ;
14
14
import { ExpandLess , ExpandMore , Help } from '@openedx/paragon/icons' ;
15
+ import propTypes from 'prop-types' ;
16
+
15
17
import messages from './messages' ;
16
18
17
19
ensureConfig ( [
@@ -26,9 +28,9 @@ ensureConfig([
26
28
] , 'Studio Footer component' ) ;
27
29
28
30
const StudioFooter = ( {
29
- // injected
30
- intl,
31
+ full,
31
32
} ) => {
33
+ const intl = useIntl ( ) ;
32
34
const [ isOpen , setIsOpen ] = useState ( false ) ;
33
35
const { config } = useContext ( AppContext ) ;
34
36
@@ -49,7 +51,7 @@ const StudioFooter = ({
49
51
</ Button >
50
52
< div className = "col border-top ml-2" />
51
53
</ div >
52
- < Container size = "xl" className = "px-4" >
54
+ < Container size = { full ? undefined : 'xl' } className = "px-4" >
53
55
< TransitionReplace >
54
56
{ isOpen ? (
55
57
< ActionRow key = "help-link-button-row" className = "py-4" data-testid = "helpButtonRow" >
@@ -139,8 +141,11 @@ const StudioFooter = ({
139
141
} ;
140
142
141
143
StudioFooter . propTypes = {
142
- // injected
143
- intl : intlShape . isRequired ,
144
+ full : propTypes . bool ,
145
+ } ;
146
+
147
+ StudioFooter . defaultProps = {
148
+ full : false ,
144
149
} ;
145
150
146
- export default injectIntl ( StudioFooter ) ;
151
+ export default StudioFooter ;
0 commit comments