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,9 @@ import {
12
12
TransitionReplace ,
13
13
} from '@openedx/paragon' ;
14
14
import { ExpandLess , ExpandMore , Help } from '@openedx/paragon/icons' ;
15
+ import classNames from 'classnames' ;
16
+ import PropTypes from 'prop-types' ;
17
+
15
18
import messages from './messages' ;
16
19
17
20
ensureConfig ( [
@@ -26,12 +29,14 @@ ensureConfig([
26
29
] , 'Studio Footer component' ) ;
27
30
28
31
const StudioFooter = ( {
29
- // injected
30
- intl,
32
+ containerProps,
31
33
} ) => {
34
+ const intl = useIntl ( ) ;
32
35
const [ isOpen , setIsOpen ] = useState ( false ) ;
33
36
const { config } = useContext ( AppContext ) ;
34
37
38
+ const { containerClassName, ...restContainerProps } = containerProps || { } ;
39
+
35
40
return (
36
41
< >
37
42
< div className = "m-0 mt-6 row align-items-center justify-content-center" >
@@ -49,7 +54,11 @@ const StudioFooter = ({
49
54
</ Button >
50
55
< div className = "col border-top ml-2" />
51
56
</ div >
52
- < Container size = "xl" className = "px-4" >
57
+ < Container
58
+ size = "xl"
59
+ className = { classNames ( 'px-4' , containerClassName ) }
60
+ { ...restContainerProps }
61
+ >
53
62
< TransitionReplace >
54
63
{ isOpen ? (
55
64
< ActionRow key = "help-link-button-row" className = "py-4" data-testid = "helpButtonRow" >
@@ -139,8 +148,11 @@ const StudioFooter = ({
139
148
} ;
140
149
141
150
StudioFooter . propTypes = {
142
- // injected
143
- intl : intlShape . isRequired ,
151
+ containerProps : PropTypes . shape ( Container . propTypes ) ,
152
+ } ;
153
+
154
+ StudioFooter . defaultProps = {
155
+ containerProps : { } ,
144
156
} ;
145
157
146
- export default injectIntl ( StudioFooter ) ;
158
+ export default StudioFooter ;
0 commit comments