1414 * limitations under the License.
1515 */
1616
17+ import { createTheme , ThemeProvider } from '@mui/material/styles' ;
1718import { Meta , StoryFn } from '@storybook/react' ;
1819import { http , HttpResponse } from 'msw' ;
1920import { useEffect } from 'react' ;
@@ -33,6 +34,16 @@ const AUTH_URL = `http://localhost:4466/clusters/${CLUSTER_NAME}/apis/authorizat
3334// Store the initial path at module scope, so we can always restore to it
3435const INITIAL_PATH = window . location . pathname ;
3536
37+ const theme = createTheme ( {
38+ components : {
39+ MuiButtonBase : {
40+ defaultProps : {
41+ disableRipple : true ,
42+ } ,
43+ } ,
44+ } ,
45+ } ) ;
46+
3647export default {
3748 title : 'Pod/PodDetailsView' ,
3849 component : PodDetails ,
@@ -63,7 +74,11 @@ export default {
6374 } ;
6475 } , [ ] ) ;
6576
66- return < Story /> ;
77+ return (
78+ < ThemeProvider theme = { theme } >
79+ < Story />
80+ </ ThemeProvider >
81+ ) ;
6782 } ;
6883
6984 return < ClusterMockWrapper /> ;
@@ -90,9 +105,7 @@ export default {
90105 ] ,
91106 } )
92107 ) ,
93- http . get ( `http://localhost:4466/clusters/${ CLUSTER_NAME } /api/v1/pods` , ( ) =>
94- HttpResponse . json ( { } )
95- ) ,
108+ http . get ( PODS_URL , ( ) => HttpResponse . json ( { items : [ ] } ) ) ,
96109 http . post ( AUTH_URL , ( ) =>
97110 HttpResponse . json ( { status : { allowed : true , reason : '' , code : 200 } } )
98111 ) ,
@@ -187,7 +200,11 @@ DebugDisabled.decorators = [
187200 } ;
188201 } , [ ] ) ;
189202
190- return < Story /> ;
203+ return (
204+ < ThemeProvider theme = { theme } >
205+ < Story />
206+ </ ThemeProvider >
207+ ) ;
191208 } ;
192209
193210 return < ClusterMockWrapper /> ;
0 commit comments