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