0.0.9 • Published 4 years ago
color-statistics v0.0.9
color-statistics
React color-statistics
Screenshot
Browsers support
IE / Edge | Firefox | Chrome | Safari | Opera |
---|---|---|---|---|
IE 8 + ✔ | Firefox 31.0+ ✔ | Chrome 31.0+ ✔ | Safari 7.0+ ✔ | Opera 30.0+ ✔ |
Install
Usage
var Statistics = require('color-statistics');
var React = require('react');
var ReactDOM = require('react-dom');
ReactDOM.render(
<Statistics title='' align='left' type='success' tip={<span>Statistics</span>} />,
container,
);
Examples
npm start
and then go to
http://localhost:9001
Online examples: github-pages or vercel
API
Props
name | type | default | description |
---|---|---|---|
style? | React.CSSProperties | {} | custom container style |
titleStyle? | React.CSSProperties | {} | custom title style |
numberStyle? | React.CSSProperties | {} | custom number style |
tipStyle? | React.CSSProperties | {} | custom tip style |
type | string | 'primary' | one of 'primary', 'success', 'warning', 'info' |
align | string | 'right' | one of 'left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight' |
showTip | boolean | string | true | show tip icon or not |
tip | string | ReactNode | '' | tips info |
number | string | number | number |
Development
npm install
npm start
Test Case
npm test
npm run chrome-test
Coverage
npm run coverage
License
color-statistics
is released under the MIT license.