66 */ 
77
88import  React ,  {  type  JSX  }  from  "react" ; 
9- import  {  fn  }  from  "storybook/test" ; 
109
1110import  type  {  Meta ,  StoryFn  }  from  "@storybook/react-vite" ; 
1211import  {  ViewWrapper  }  from  "../../ViewWrapper" ; 
13- import  {  WidgetCardView ,  WidgetCardViewModel ,  WidgetCardViewSnapshot  }  from  "./WidgetCardView" ; 
12+ import  {  WidgetCardView ,  WidgetCardViewActions ,  WidgetCardViewModel ,  WidgetCardViewSnapshot  }  from  "./WidgetCardView" ; 
13+ import  {  Room  }  from  "matrix-js-sdk/src/matrix" ; 
1414
15- const  WidgeCardViewWrapper  =  ( props : WidgetCardViewModel ) : JSX . Element  =>  ( 
15+ type  WidgetCardProps  =  WidgetCardViewSnapshot  &  WidgetCardViewActions ; 
16+ 
17+ const  WidgeCardViewWrapper  =  ( props : WidgetCardProps ) : JSX . Element  =>  ( 
1618    < ViewWrapper < WidgetCardViewSnapshot ,  WidgetCardViewModel >  Component = { WidgetCardView }  props = { props }  /> 
1719) ; 
1820
1921export  default  { 
2022    title : "RightPanel/WidgetCardView" , 
21-     component : WidgetCardView , 
23+     component : WidgeCardViewWrapper , 
2224    tags : [ "autodocs" ] , 
2325    args : { 
24-         room : "roomId" , 
26+         room : new   Room ( "roomId" ) , 
2527        app : undefined , 
2628        userId : "@userId" , 
2729        widgetPageTitle : "" , 
@@ -30,20 +32,20 @@ export default {
3032        creatorUserId : undefined , 
3133        onClose : ( )  =>  void 
3234    } 
33- }  as  unknown   as   Meta < typeof  WidgeCardViewWrapper > ; 
35+ }  as  Meta < typeof  WidgeCardViewWrapper > ; 
3436
3537const  Template : StoryFn < typeof  WidgeCardViewWrapper >  =  ( args )  =>  < WidgeCardViewWrapper  { ...args }  /> ; 
3638
3739export  const  Default  =  Template . bind ( { } ) ; 
3840
39- export  const  WidgetCreated  =  Template . bind ( { } ) ; 
40- WidgetCreated . args  =  { 
41-     room : "roomId" , 
42-     app : undefined , 
43-     userId : "@userId" , 
44-     widgetPageTitle : "" , 
45-     widgetName : "" , 
46-     shouldEmptyWidgetCard : true , 
47-     creatorUserId : undefined , 
48-     onClose : ( )  =>  void 
49- } ; 
41+ //  export const WidgetCreated = Template.bind({});
42+ //  WidgetCreated.args = {
43+ //      room: "roomId",
44+ //      app: undefined,
45+ //      userId: "@userId",
46+ //      widgetPageTitle: "",
47+ //      widgetName: "",
48+ //      shouldEmptyWidgetCard: true,
49+ //      creatorUserId: undefined,
50+ //      onClose: () => void
51+ //  };
0 commit comments