-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
In the our code, we check render the css by checking attr data-copied. To make typescript working correctly, we import SectionElement from file @uiw/react-json-view/cjs/store/Section. However, typescript doesn't allow deep module import for the moduleResolution: builder. is it possible to expose the CopiedSectionElementandSectionElement` to the top level so import is viable in more modern typescript setup.
const Copied = ReactJsonView.Copied
export const JsonView = ({
...
}: JsonViewerProps) => {
return (
<ReactJsonView
...
>
<Copied
render={({ style, onClick, ...props }: SectionElement<"svg">) => {
const copied = props["data-copied"];
...
}/>
</ReactJsonView>
);
}
Metadata
Metadata
Assignees
Labels
No labels