Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Mar 8, 2024
1 parent 13e872c commit e887915
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/renderers/react/src/docs/jsxDecorator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const toPascalCase = (str: string) => str.charAt(0).toUpperCase() + str.slice(1)
* @returns {string | null} A displayName for the Symbol in case elementType is a Symbol; otherwise, null.
*/
export const getReactSymbolName = (elementType: any): string => {
const symbolDescription = elementType.toString().replace(/^Symbol\((.*)\)$/, '$1');
const symbolDescription: string = elementType.toString().replace(/^Symbol\((.*)\)$/, '$1');

const reactComponentName = symbolDescription
.split('.')
Expand Down Expand Up @@ -74,7 +74,7 @@ type JSXOptions = Options & {
};

/** Apply the users parameters and render the jsx for a story */
export const renderJsx = (code: React.ReactElement, options: JSXOptions) => {
export const renderJsx = (code: React.ReactElement, options?: JSXOptions) => {
if (typeof code === 'undefined') {
logger.warn('Too many skip or undefined component');
return null;
Expand Down

0 comments on commit e887915

Please sign in to comment.