We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi. I'm using a Storybook with NextJS app integration
There is an issue when using addon-jsx globally in my app. The jsx output is not correct. It contains a redundant Storybook's wrapper
But it works correct if apply addon to the single story.
This may be similar to the issue #131
preview.ts:
preview.ts
import { addDecorator } from '@storybook/react'; import { jsxDecorator } from 'storybook-addon-jsx'; export const decorators = [ withI18next({ i18n, languages: { en: 'English', fr: 'French', de: 'German', es: 'Spanish' } }), Story => { return ( <Suspense fallback="loading..."> <Provider store={store}> <SnackbarProvider maxSnack={3} anchorOrigin={{ vertical: 'bottom', horizontal: 'center', }} > <Story /> </SnackbarProvider> </Provider> </Suspense> ) }, withStaticMarkup(), ]; addDecorator(jsxDecorator);
storybook-addon-jsx output:
storybook-addon-jsx
<RouterContext.Provider value={{ asPath: '/', back: function () {var args = [];for (var _i = 0; _i < arguments.length; _i++) {args[_i] = arguments[_i];}(0, addon_actions_1.action)('nextRouter.back').apply(void 0, args);}, beforePopState: function () {var args = [];for (var _i = 0; _i < arguments.length; _i++) {args[_i] = arguments[_i];}(0, addon_actions_1.action)('nextRouter.beforePopState').apply(void 0, args);}, events: { emit: function () {var args = [];for (var _i = 0; _i < arguments.length; _i++) {args[_i] = arguments[_i];}(0, addon_actions_1.action)('nextRouter.events.emit').apply(void 0, args);}, off: function () {var args = [];for (var _i = 0; _i < arguments.length; _i++) {args[_i] = arguments[_i];}(0, addon_actions_1.action)('nextRouter.events.off').apply(void 0, args);}, on: function () {var args = [];for (var _i = 0; _i < arguments.length; _i++) {args[_i] = arguments[_i];}(0, addon_actions_1.action)('nextRouter.events.on').apply(void 0, args);} }, isFallback: false, locale: undefined, pathname: '/', prefetch: function () {var args = [];for (var _i = 0; _i < arguments.length; _i++) {args[_i] = arguments[_i];}(0, addon_actions_1.action)('nextRouter.prefetch').apply(void 0, args);return Promise.resolve();}, push: function () {var args = [];for (var _i = 0; _i < arguments.length; _i++) {args[_i] = arguments[_i];}(0, addon_actions_1.action)('nextRouter.push').apply(void 0, args);return Promise.resolve(true);}, query: {}, reload: function () {var args = [];for (var _i = 0; _i < arguments.length; _i++) {args[_i] = arguments[_i];}(0, addon_actions_1.action)('nextRouter.reload').apply(void 0, args);}, replace: function () {var args = [];for (var _i = 0; _i < arguments.length; _i++) {args[_i] = arguments[_i];}(0, addon_actions_1.action)('nextRouter.replace').apply(void 0, args);return Promise.resolve(true);}, route: '/' }} > <No Display Name abortSignal={[object AbortSignal]} applyLoaders={function applyLoaders(_x) {return _ref.apply(this, arguments);}} argTypes={{ ariaLabel: { control: { type: 'text' }, description: '', name: 'ariaLabel', table: { defaultValue: null, jsDocTags: undefined, type: { detail: undefined, summary: 'string' } }, type: { name: 'string', required: false } }, children: { control: { type: 'object' }, description: 'The content of the button', name: 'children', table: { defaultValue: null, jsDocTags: undefined, type: { detail: undefined, summary: 'ReactNode' } }, type: { name: 'other', required: false, value: 'ReactNode' } }, ...
A JSX output to be correct (without redundant Storybook's wrapper)
Here is an JSX output example
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Hi. I'm using a Storybook with NextJS app integration
There is an issue when using addon-jsx globally in my app.
The jsx output is not correct. It contains a redundant Storybook's wrapper
But it works correct if apply addon to the single story.
This may be similar to the issue #131
Steps to reproduce the behavior
preview.ts
:storybook-addon-jsx
output:Expected behavior
A JSX output to be correct (without redundant Storybook's wrapper)
Screenshots and/or logs
Here is an JSX output example
Environment
The text was updated successfully, but these errors were encountered: