mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 19:44:21 +00:00
🗒 Add a README.md
This commit is contained in:
parent
bf781aad84
commit
01cc681cf2
1 changed files with 34 additions and 4 deletions
38
README.md
38
README.md
|
@ -8,10 +8,40 @@ An interactive documentation for `bluelib-react` is available [here](http://gh.s
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
<!-- TODO: Do this -->
|
You can download `bluelib-react` using your favourite node package manager:
|
||||||
This package hasn't been published on npm yet.
|
|
||||||
|
```console
|
||||||
|
$ npm install --save @steffo/bluelib-react
|
||||||
|
```
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ yarn add @steffo/bluelib-react
|
||||||
|
```
|
||||||
|
|
||||||
|
Ensure you have `react` and `react-dom` installed, as they are peer dependencies of this package and aren't installed automatically.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
<!-- TODO: Do this too -->
|
You can import the components you want to use using the ES6 import syntax:
|
||||||
The guide for the usage of this package hasn't been written yet.
|
|
||||||
|
```js
|
||||||
|
import { Box } from "@steffo/bluelib-react"
|
||||||
|
```
|
||||||
|
|
||||||
|
**All** Bluelib components must be **inside a `<Bluelib>` container** for them to work correctly!
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
import { Bluelib, Heading, Box } from "@steffo/bluelib-react"
|
||||||
|
|
||||||
|
|
||||||
|
const MyComponent = props => (
|
||||||
|
<Bluelib theme={"royalblue"}>
|
||||||
|
<Heading level={1}>
|
||||||
|
Hello world!
|
||||||
|
</Heading>
|
||||||
|
<Box>
|
||||||
|
Welcome to Bluelib!
|
||||||
|
</Box>
|
||||||
|
</Bluelib>
|
||||||
|
)
|
||||||
|
```
|
Loading…
Reference in a new issue