Skip to content

Instantly share code, notes, and snippets.

@MykolaGolubyev
Last active February 21, 2019 17:04
Show Gist options
  • Save MykolaGolubyev/b67fd2c263c1104eed0461145ad20ec7 to your computer and use it in GitHub Desktop.
Save MykolaGolubyev/b67fd2c263c1104eed0461145ad20ec7 to your computer and use it in GitHub Desktop.
import { Registries, WrapperProps } from 'react-component-viewer';
const registries = new Registries({componentWrapper: DemoWrapper});
registries.add('components', {componentWrapper: WidgetsWrapper})
.registerAsGrid('Links', 300, linksDemo)
.registerAsTwoColumnTable('Buttons', buttonsDemo)
.registerAsRows('Inputs', inputsDemo);
function WidgetsWrapper({OriginalComponent}: WrapperProps) {
return (
...
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment