-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
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
Controls: JSX support #11428
Comments
I just found a walkaround before this issue is supported. It can be set individually in the // .storybook/preview.tsx
import { Preview } from '@storybook/react';
import '../src/index.css';
const OVERWRITE_REACT_NODE_TO_STRING = {
control: 'text',
description: 'Overwritten ReactNode type object for Storybook.',
} as const;
const preview: Preview = {
argTypes: {
children: OVERWRITE_REACT_NODE_TO_STRING,
anyOtherProp: OVERWRITE_REACT_NODE_TO_STRING,
},
// ...othersettings
};
export default preview; It can also be set in the |
@ronny1020 that workaround still doesn't support interpolating jsx from the |
It's just a walkaround to show text control instead of the object editor. |
Currently React nodes, such as
children
, show a JSON object editor by default. They should show a text editor instead that supports full JSX editing.The text was updated successfully, but these errors were encountered: