1.0.2 • Published 4 years ago

react-theme-builder v1.0.2

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

React theme builder is a tool for simplifying the process of theme design in your react app. It provides an interface for modifying properties of your theme live, and provides a simple API for plugging these properties into your components using styled.js or inline styles in jsx.

Just wrap your app in the HOC provided, and pass it a "theme" prop with your theme settings. Your theme properties will be passed to children components as props.theme, and you can then edit these settings live on your website, and copy and paste your edited settings as a new or updated theme.

Use the "editable" prop to toggle the live theme editor on or off.

example: const myTheme = { primaryColor:"blue", secondaryColor:"green" }

function myApp({theme}) {

<div style = {{
    color:theme.primaryColor,
    background:theme.secondaryColor
}}>
    Hello world
</div>

}