README
snake-eyes
Snake eyes (also fangs, scales, bones, and other relevant parts).
Standard interface components and styling for CoBrain web apps.
Demo (storybook)
Run:
npm run storybook
It will open server on 9001 port where you can see basic examples of components. Stories in the storybook are work-in-progress.
Using components
if your build system supports jsx as well as handful of other common babel transformations from node_modules (such is the case with create-react-app v2), you may use components from source.
import { Icon } from 'snake-eyes/components';
// or
import Icon from 'snake-eyes/components/Icon';
Otherwise:
import { Icon } from 'snake-eyes/dist/components';
// or
import { Icon } from 'snake-eyes';
Using styles
if your build system supports CSS Modules from node_modules (such is the case with create-react-app v2), you may use styleguide classes from source.
import inputStyles from 'snake-eyes/styleguide/icons.module.css';
Otherwise, use class mappings generated in dist folder:
import inputStyles from 'snake-eyes/styleguide/icons.module.css';
// It's actually `icons.module.css.js`
Development
First of all, as customary, install all dependencies:
npm i
TBD dev server
Build frontend artifacts into ./dist
directory:
npm run build
Testing
Test cases: none so far.
Deployment
TBD