@openworklabs/filecoin-wallet-styleguide
v0.1.6
Published
Styleguide used for the Filecoin web wallet.
Downloads
9
Readme
Filecoin-wallet-styleguide
Repo layout
React component library lives in /src
. The /storybook
directory has all the stories, and runs the front-end. The /dist
directory contains the transpiled JSX for publishing to npm.
Developing locally
git clone [email protected]:openworklabs/filecoin-wallet-styleguide.git && cd filecoin-wallet-styleguide
npm i
npm link
npm run start
cd storybook
npm i
npm link @openworklabs/filecoin-wallet-styleguide
npm run storybook
Adding a new component
- Create a new directory in
/src
=>/src/<ComponentName>
- Add the component and its prop-types. Default export the component.
- Export the component in
/src/index.js
(export { default as ComponentName } from './ComponentName'
) - Add a new file
/storybook/stories/<ComponentName>.stories.js
- Create a new story for the component.
Usage
Install
npm install --save @openworklabs/filecoin-wallet-styleguide styled-components
Import
import React, { Component } from 'react';
import { Button } from '@openworklabs/filecoin-wallet-styleguide';
class Example extends Component {
render() {
return <Button size="medium">Click me!</Button>;
}
}