Commit e3f23f4 1 parent c501c67 commit e3f23f4 Copy full SHA for e3f23f4
File tree 2 files changed +7
-5
lines changed
packages/main/src/components/ThemeProvider
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 2
2
"packages" : [
3
3
" packages/*"
4
4
],
5
- "version" : " 0.6.1 -rc.0" ,
5
+ "version" : " 0.6.0 -rc.0" ,
6
6
"npmClient" : " yarn" ,
7
7
"useWorkspaces" : true ,
8
8
"command" : {
Original file line number Diff line number Diff line change 1
- import { withStyles } from '@ui5/webcomponents-react-base /lib/withStyles ' ;
1
+ import { ThemeProvider } from '@ui5/webcomponents-react/lib/ThemeProvider ' ;
2
2
import { mount } from 'enzyme' ;
3
3
import React from 'react' ;
4
- import { ThemeProvider } from '@ui5/webcomponents-react/lib/ThemeProvider' ;
4
+ import { useTheme } from 'react-jss' ;
5
+ import { JSSTheme } from '../../interfaces/JSSTheme' ;
5
6
6
7
describe ( 'ThemeProvider' , ( ) => {
7
8
it ( 'Provides Correct Context' , ( done ) => {
8
- const InnerComponent = withStyles ( ( ) => { } ) ( ( { theme } ) => {
9
+ const InnerComponent = ( ) => {
10
+ const theme = useTheme ( ) as JSSTheme ;
9
11
expect ( theme . theme ) . toEqual ( 'sap_fiori_3' ) ;
10
12
expect ( theme . contentDensity ) . toEqual ( 'Cozy' ) ;
11
13
done ( ) ;
12
14
return null ;
13
- } ) ;
15
+ } ;
14
16
15
17
mount (
16
18
< ThemeProvider >
You can’t perform that action at this time.
0 commit comments