Travix UI Components' repository.
npm i travix-ui-kit -Sinstall as a dependency- add npm script
buildwith valuecd node_modules/travix-ui-kit/ && npm run build && cd ../..to yourpackage.json
const Button = require('travix-ui-kit').Button;
// or
import { Button } from 'travix-ui-kit';
function renderSomething({onAdd}) {
return (
<Button size="s" onClick={onAdd}>Add value</Button>
);
}use file node_modules/travix-ui-kit/dist/bundle.css
- you can create an alias in your webpack plugin
- or inject it in your page current styles bundle
- or copy to public folder and add as separate style file with
<link>
Warning: Directly using file components/index.scss not recommended. We're not promising that we will use SCSS in future or will keep file's structure
- Soon we will add a public web service. For now you need to install it on your local machine
- We are using default styling theme. If you need to adjust it, you can do it by passing proper theme YAML file as env var:
THEME_PATH=/some/path/to/theme.yaml npm run build
- nodejs v4 or higher
git clonethis reponpm ito install dependenciesnpm run buildto build theme, styles and javascript
npm run styleguide-buildto build web service with living style guidenpm run styleguide-serverto run web service with living style guide- open localhost:3000
npm run build:watchto build the themes, styles and javascript on each file changenpm run build-theme:watchto build the themes on each theme changeTHEME_PATH=/some/path/to/theme.yaml npm run buildto pass other than default theme. Theme must be a valid yaml filenpm run styleguide-serverto run web service with livingstyle guide and review changes
npm run testto run unit testnpm run covto run unit test with coverage reportnpm run update-snapshotsto update current unit test snapshotsnpm run lintto check ES-lint errors
- Developer must follow the sturcture of the project
- every component must contain own directory with its own
.js,.scssand.mdfiles
- every component must contain own directory with its own
- 100% unit test coverage of components and helpers
- 0 ES lint errors