Pile
A lightweight mobile components library build with React.
Docs
Dependences
- react@16.x
- react-dom@16.x
Installation
npm i pile-ui@latest --save
// import css
npm i @pile-ui/theme-default
import component
// style1 // single component
import all css
import single css
Example
We have several examples on the documentation. Here is the first one to get you started:
import * as React from 'react';import * as ReactDOM from 'react-dom';import Button from 'pile-ui'import '@pile-ui/theme-default/lib/index.min.css' { return <Button>hello Pile</Button> ; } ReactDOM;
Development
git clone git@githubcom:didi/pilejsgitcd pilejsnpm installnpm start
css build
cd packages/theme-default
npm run build
npm run build
Build single package by running the following:
npm run build -- --scope "@pile-ui/button"
Build multiple packages where scope is a glob expression:
npm run build -- --scope "{@pile-ui/button,@pile-ui/icon}"
Watch all filters (auto-rebuild upon src changes):
npm run watch
Contributing
Welcome to contribute by creating issues or sending pull requests. See Contributing Guide for guidelines.
License
pile is licensed under the Apache License 2.0. See the LICENSE file.