1 | ## Melting Pot
|
2 |
|
3 | <p align="center">
|
4 | <img src="https://badgen.net/npm/v/@withvoid/melting-pot" alt="">
|
5 | <img src="https://badgen.net/badge/license/MIT/blue" alt="">
|
6 | <img src="https://badgen.net/npm/dt/@withvoid/melting-pot" alt="">
|
7 | </p>
|
8 |
|
9 | The `@withvoid/melting-pot` package contains utilities, helper methods - your typical daily use functions (mostly in hooks).
|
10 |
|
11 | ## Demo
|
12 |
|
13 | Hosted at 2 great platforms together.
|
14 |
|
15 | * Netlify: [melting-pot.netlify.com](https://melting-pot.netlify.com)
|
16 | * <strike>Zeits NOW: [melting-pot.now.sh](https://melting-pot.now.sh/)</strike> [Has issues, PR's are welcome]
|
17 |
|
18 | ## Getting Started
|
19 |
|
20 | Install the package via npm or yarn:
|
21 |
|
22 | ```js
|
23 | npm install @withvoid/melting-pot --save
|
24 | ```
|
25 |
|
26 | Or if you prefer <b>yarn</b>
|
27 |
|
28 | ```js
|
29 | yarn add @withvoid/melting-pot
|
30 | ```
|
31 |
|
32 | Create your first application like so:
|
33 |
|
34 | ```
|
35 | import React from "react"
|
36 | import { useWindowSize } from "@withvoid/melting-pot"
|
37 |
|
38 | const App = () => (
|
39 | const {width, height} = useWindowSize();
|
40 | <div>
|
41 | <p>The current height of screen is {height}px</p>
|
42 | <button type="button">
|
43 | {width <= 340 ? 'Click': 'Click Me!'}
|
44 | </button>
|
45 | </div>
|
46 | )
|
47 | ``` |
\ | No newline at end of file |