@@ -7,7 +7,7 @@ import OneColumn from './OneColumn';
7
7
import TwoColumns from './TwoColumns' ;
8
8
import SkipLinks from './SkipLinks' ;
9
9
10
- import theme from './Layout.module.scss' ;
10
+ import style from './Layout.module.scss' ;
11
11
12
12
const DISPLAY_MODES = {
13
13
ONE_COLUMN : 'OneColumn' ,
@@ -42,13 +42,14 @@ function Layout({
42
42
drawers,
43
43
tabs,
44
44
hasTheme,
45
+ theme,
45
46
children,
46
47
getComponent,
47
48
...rest
48
49
} ) {
49
- const appCSS = classnames ( 'tc-layout' , theme . layout , hasTheme && TALEND_T7_THEME_CLASSNAME ) ;
50
- const headerCSS = classnames ( 'tc-layout-header' , theme . header ) ;
51
- const footerCSS = classnames ( 'tc-layout-footer' , theme . footer ) ;
50
+ const appCSS = classnames ( 'tc-layout' , style . layout , hasTheme && TALEND_T7_THEME_CLASSNAME ) ;
51
+ const headerCSS = classnames ( 'tc-layout-header' , style . header ) ;
52
+ const footerCSS = classnames ( 'tc-layout-footer' , style . footer ) ;
52
53
let Component ;
53
54
let skipLinkNavigationId ;
54
55
switch ( mode ) {
@@ -70,9 +71,9 @@ function Layout({
70
71
const safeFooter = Inject . getReactElement ( getComponent , footer ) ;
71
72
72
73
return (
73
- < ThemeProvider >
74
+ < ThemeProvider theme = { theme } >
74
75
< div id = { id } className = { appCSS } >
75
- < div className = { theme [ 'skip-links' ] } >
76
+ < div className = { style [ 'skip-links' ] } >
76
77
< SkipLinks navigationId = { skipLinkNavigationId } mainId = "#tc-layout-main" />
77
78
</ div >
78
79
{ safeHeader && (
@@ -117,6 +118,7 @@ Layout.propTypes = {
117
118
drawers : PropTypes . arrayOf ( PropTypes . element ) ,
118
119
tabs : PropTypes . shape ( TabBar . propTypes ) ,
119
120
hasTheme : PropTypes . bool ,
121
+ theme : PropTypes . string ,
120
122
children : PropTypes . node ,
121
123
getComponent : PropTypes . func ,
122
124
} ;
0 commit comments