Skip to content

Commit

Permalink
Merge pull request #43 from mojotech/cw/readme
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
jssee authored Jun 10, 2019
2 parents d806863 + 46803ae commit fae8059
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
MojoTech UI
# MojoTech UI
A set of styled React components for MojoTech.com user interfaces.

## Installation
Mojo-UI is available as an npm module

```
// with yarn
yarn add @mojotech/mojo-ui
// with npm
npm install @mojotech/mojo-ui
```

## Setup
When using make sure to wrap all the components in the `<ThemeDecorator />` component. This component provides the theme styles for the components, as well as adds MojoTech fonts and CSS reset.

Example:
```tsx
import * as React from 'react'
import { ThemeDecorator, Section, Text } from '@mojotech/mojo-ui'

const Page: React.FunctionComponent = () => (
<ThemeDecorator>
<Section>
<Text as="h1" size={6}>Build Better.</Text>
</Section>
</ThemeDecorator>
)

```

## Development
Upon cloning the repo and installing the dependencies run `npm start` to start the storybook dev server. Run `npm run build-storybook` to build a static version of the storybook to the `storybook-static` folder. Run `npm build` to compile the library into the `dist` folder.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mojotech/mojo-ui",
"version": "0.2.0",
"version": "0.2.1",
"description": "A set of styled components for MojoTech user interfaces.",
"main": "dist/bundle.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit fae8059

Please sign in to comment.