diff --git a/core/webpack-configs/src/react/index.ts b/core/webpack-configs/src/react/index.ts index 7428b0a26..59597ed76 100644 --- a/core/webpack-configs/src/react/index.ts +++ b/core/webpack-configs/src/react/index.ts @@ -47,25 +47,23 @@ export const react: Configuration = { { test: /\.(md|mdx)$/i, exclude: [/node_modules/], - use: [ - { - loader: 'babel-loader', - options: { - presets: [ - [require.resolve('@babel/preset-env'), { modules: 'commonjs' }], - require.resolve('@babel/preset-react'), - ], - }, - }, - { - loader: '@component-controls/loader/loader', - options: { - mdx: { - transformMDX: true, - }, - }, + loader: 'babel-loader', + options: { + presets: [ + [require.resolve('@babel/preset-env'), { modules: 'commonjs' }], + require.resolve('@babel/preset-react'), + ], + }, + }, + { + test: /\.(md|mdx)$/i, + exclude: [/node_modules/], + loader: '@component-controls/loader/loader', + options: { + mdx: { + transformMDX: true, }, - ], + }, }, { test: /\.(story|stories|doc|docs).(js|jsx|ts|tsx)$/, diff --git a/examples/gatsby/src/stories/smart-controls.stories.mdx b/examples/gatsby/src/stories/smart-controls.stories.mdx new file mode 100644 index 000000000..b7453042d --- /dev/null +++ b/examples/gatsby/src/stories/smart-controls.stories.mdx @@ -0,0 +1,48 @@ +import { Meta} from '@component-controls/storybook'; +import { PropsTable, Playground, Story, ComponentSource, StorySource } from '@component-controls/blocks'; +import { Button } from '../../../stories/src/components/Button'; + + + + +# Smart controls + + + + + + + + + + + + {(props) => ( +