Skip to content

Commit 9091c07

Browse files
committed
Corrected use of Source
1 parent 435c154 commit 9091c07

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

stories/SampleComponent.stories.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react';
12
import Source from '@idesigncode/storybook-tools/Source.mjs';
23
import { expect, userEvent, within } from '../test/test-utils.mjs';
34
import SampleComponentExample from './SampleComponent.example.mjs';
@@ -24,5 +25,5 @@ export const Implementation = {
2425
args: {
2526
code: SampleComponentExampleRaw,
2627
},
27-
render: Source,
28+
render: (args) => <Source {...args} />,
2829
};

stories/sampleFunction.stories.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react';
12
import Source from '@idesigncode/storybook-tools/Source.mjs';
23
import sampleFunction from '../src/sampleFunction.mjs';
34
import { expect } from '../test/test-utils.mjs';
@@ -23,5 +24,5 @@ export const Implementation = {
2324
args: {
2425
code: `sampleFunction('${Example.args.arg}')`,
2526
},
26-
render: Source,
27+
render: (args) => <Source {...args} />,
2728
};

0 commit comments

Comments
 (0)