File tree Expand file tree Collapse file tree
packages/main/src/components/ThemeProvider Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "packages" : [
33 " packages/*"
44 ],
5- "version" : " 0.6.0" ,
5+ "version" : " 0.6.0-rc.0 " ,
66 "npmClient" : " yarn" ,
77 "useWorkspaces" : true ,
88 "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 ' ;
22import { mount } from 'enzyme' ;
33import React from 'react' ;
4- import { ThemeProvider } from '@ui5/webcomponents-react/lib/ThemeProvider' ;
4+ import { useTheme } from 'react-jss' ;
5+ import { JSSTheme } from '../../interfaces/JSSTheme' ;
56
67describe ( 'ThemeProvider' , ( ) => {
78 it ( 'Provides Correct Context' , ( done ) => {
8- const InnerComponent = withStyles ( ( ) => { } ) ( ( { theme } ) => {
9+ const InnerComponent = ( ) => {
10+ const theme = useTheme ( ) as JSSTheme ;
911 expect ( theme . theme ) . toEqual ( 'sap_fiori_3' ) ;
1012 expect ( theme . contentDensity ) . toEqual ( 'Cozy' ) ;
1113 done ( ) ;
1214 return null ;
13- } ) ;
15+ } ;
1416
1517 mount (
1618 < ThemeProvider >
You can’t perform that action at this time.
0 commit comments