From d3a6544bc5fd7b3d2d65494ba1c3155b024a436e Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 6 Dec 2022 11:21:12 -0300 Subject: using web-utils in anastasis-webui --- packages/anastasis-webui/src/test-utils.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'packages/anastasis-webui/src/test-utils.ts') diff --git a/packages/anastasis-webui/src/test-utils.ts b/packages/anastasis-webui/src/test-utils.ts index 1fcc753ee..f220540f1 100644 --- a/packages/anastasis-webui/src/test-utils.ts +++ b/packages/anastasis-webui/src/test-utils.ts @@ -41,8 +41,10 @@ export function createExample( // check how we can build evaluatedProps in render time const evaluatedProps = typeof props === "function" ? props() : props; const Render = (args: any): VNode => create(Component, args); - Render.args = evaluatedProps; - return Render; + return { + component: Render, + props: evaluatedProps + }; } export function createExampleWithCustomContext( @@ -58,8 +60,10 @@ export function createExampleWithCustomContext( ...contextProps, children: [Render(args)], } as any); - WithContext.args = evaluatedProps; - return WithContext; + return { + component: WithContext, + props: evaluatedProps + }; } export function NullLink({ -- cgit v1.2.3