1 | import React, { ComponentProps } from 'react';
|
2 | import PrettyPropType from 'storybook-pretty-props';
|
3 | declare type StyleSheet = Record<string, React.CSSProperties>;
|
4 | export declare type ComponentMap = Record<string, {
|
5 |
|
6 | description?: string;
|
7 |
|
8 | displayName: string;
|
9 |
|
10 | children: (Node | string)[];
|
11 |
|
12 | props?: Record<string, {
|
13 |
|
14 | required?: boolean;
|
15 |
|
16 | description?: string;
|
17 |
|
18 | type: ComponentProps<typeof PrettyPropType>['propType'];
|
19 | }>;
|
20 | }>;
|
21 | interface Node {
|
22 |
|
23 | type: string;
|
24 |
|
25 | tagName: string;
|
26 |
|
27 | properties: {
|
28 |
|
29 | className: string[];
|
30 |
|
31 | style?: React.CSSProperties;
|
32 | };
|
33 |
|
34 | children: React.ReactNode;
|
35 |
|
36 | value?: string;
|
37 | }
|
38 | interface RenderRows {
|
39 |
|
40 | rows: Node[];
|
41 |
|
42 | stylesheet: StyleSheet;
|
43 |
|
44 | useInlineStyles?: boolean;
|
45 | }
|
46 |
|
47 | declare const jsxRenderer: (components: Record<string, {
|
48 |
|
49 | description?: string | undefined;
|
50 |
|
51 | displayName: string;
|
52 |
|
53 | children: (string | Node)[];
|
54 |
|
55 | props?: Record<string, {
|
56 |
|
57 | required?: boolean | undefined;
|
58 |
|
59 | description?: string | undefined;
|
60 |
|
61 | type: import("storybook-pretty-props/dist/types/types").PropTypeBase | import("storybook-pretty-props/dist/types/types").LiteralType | import("storybook-pretty-props/dist/types/types").EnumType | import("storybook-pretty-props/dist/types/types").InstanceofType | import("storybook-pretty-props/dist/types/types").SignatureType | import("storybook-pretty-props/dist/types/types").ShapeType | import("storybook-pretty-props/dist/types/types").UnionType | import("storybook-pretty-props/dist/types/types").ArrayOfType | import("storybook-pretty-props/dist/types/types").ObjectOfType | undefined;
|
62 | }> | undefined;
|
63 | }>) => ({ rows, stylesheet, useInlineStyles }: RenderRows) => (string | JSX.Element | undefined)[];
|
64 | export default jsxRenderer;
|