1 | # 🌹 @sharyn/components
|
2 |
|
3 | [![npm](https://img.shields.io/npm/v/@sharyn/components.svg)](https://www.npmjs.com/package/@sharyn/components)
|
4 |
|
5 | This package provides components built with Material UI.
|
6 |
|
7 | ## 🌹 Install
|
8 |
|
9 | ```bash
|
10 | yarn add @sharyn/components
|
11 | ```
|
12 |
|
13 | ## 🌹 Usage
|
14 |
|
15 | ### Page
|
16 |
|
17 | ```js
|
18 | // @flow
|
19 |
|
20 | import React from 'react'
|
21 | import Page from '@sharyn/components/Page'
|
22 |
|
23 | const MyCmp = () => <Page>Hello</Page>
|
24 | // or
|
25 | const MyCmp = () => <Page middle>Hello</Page>
|
26 | // options
|
27 | const MyCmp = () => <Page maxWidth={700} noPadding noPaper containerClass="" paperClass="">Hello</Page>
|
28 |
|
29 |
|
30 | export default MyCmp
|
31 | ```
|
32 |
|
33 | ### DrawerItem
|
34 |
|
35 | ```js
|
36 | // @flow
|
37 |
|
38 | import React from 'react'
|
39 | import HomeIcon from '@material-ui/icons/Home'
|
40 | import Page from '@sharyn/components/DrawerItem'
|
41 |
|
42 | const MyCmp = () => (
|
43 | <DrawerItem label="Hello" icon={HomeIcon} />
|
44 | <DrawerItem label="Hello without icon" />
|
45 | )
|
46 |
|
47 | export default MyCmp
|
48 | ```
|