Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Oct 8, 2024
1 parent e5d0c42 commit cd8b7d4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/renderers/react/src/docs/jsxDecorator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ import { addons, useEffect } from 'storybook/internal/preview-api';
import type { ArgsStoryFn, PartialStoryFn, StoryContext } from 'storybook/internal/types';

import type { Options } from 'react-element-to-jsx-string';
import reactElementToJSXString from 'react-element-to-jsx-string';
import type reactElementToJSXStringType from 'react-element-to-jsx-string';
// @ts-expect-error (this is needed, because our bundling prefers the `browser` field, but that yields CJS)
import reactElementToJSXStringRaw from 'react-element-to-jsx-string/dist/esm/index.js';

import type { ReactRenderer } from '../types';
import { isForwardRef, isMemo } from './lib';

const reactElementToJSXString = reactElementToJSXStringRaw as typeof reactElementToJSXStringType;

const toPascalCase = (str: string) => str.charAt(0).toUpperCase() + str.slice(1);

/**
Expand Down

0 comments on commit cd8b7d4

Please sign in to comment.