1.0.15 • Published 2 years ago
theme-switcher-module v1.0.15
- npm i theme-switcher-module
- import customSwitcher from 'theme-switcher-module';
- const switcherElementTemplate = customSwitcher.renderOnPage();
Set in a container for packing dangerouslySetInnerHTML:
function RenderSwitcher({template}) { const clickHandler = () =>{ customSwitcher.switchingLogic(); } return (<div dangerouslySetInnerHTML={{ __html: template}} onClick={clickHandler}>) }