-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from mojotech/cw/readme
Update readme
- Loading branch information
Showing
2 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters