Nicobar
Javascript package for theming layouts.
Install
Make sure you have node
and npm
installed.
$ npm install nicobar
Using
Vanilla JS
Create or update your code as normal using your CSS, but if something has to change, use CSS Custom properties to set a variable.
Like this
then in JS your code.
nicobar;
you can use it how many times you want.
nicobar.set(target, data)
the set
method accept String
or HTMLElement
(for while).
and the data
is a Object
with key as custom-property name.
React
Inject nicobar in your project
// orconst Nicobar = Nicobar;
then init on your component Component Constructor
Component { return <Nicobar style=obj> ... </Nicobar> }
when it is done you can only change the property style
and everything will run as expected.
Contributing
- Fork
- Create your feature branch
- Commit your changes
- Push to the branch
- Submit a pull request
Feature branch (
git checkout -b my-new-feature
) | commit (git commit -m 'Add some feature'
) | push (git push origin my-new-feature
).