clarity-components
v1.0.0
Published
React Components lib of Clarity Movement
Downloads
15
Maintainers
Readme
clarity-components - A set of components and hocs from ClarityMovement
With storybook integrated, components can be tested on gh-pages by non-developers directly.
Installation
yarn add clarity-components
or
npm install --save clarity-components
Usage
Image
- withImage(Image)
import { Image } from 'clarity-components';
const uploadImage = () => new Promise(resolve => resolve({ url: 'https://img-url' }));
<Image uploadImage={uploadImage} />
withImage
- High order component to provide data and logic
import { withImage } from 'clarity-components';
const MyImage = (props) => <div>{console.log(props)}</div>;
export default withImage(MyImage);
Documentation
With storybook, things below are included in the site:
- online demo
- prop tables
- code examples
- TODO: comments
License
Copyright © 2017, ClarityMovement. Released under the MIT license.