# @focusinlab/ratio

> Hook and HOC component to keep scale of components.

Latest version **1.0.2** (published 2020-11-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @focusinlab/ratio
pnpm add @focusinlab/ratio
yarn add @focusinlab/ratio
bun add @focusinlab/ratio
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-11-10 |
| First published | 2020-11-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 13.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | focus-in-lab |
| Maintainers | focusinlab |

## Links

- npm: https://www.npmjs.com/package/@focusinlab/ratio
- Repository: https://github.com/focus-in-lab/ratio
- npm.io page: https://npm.io/package/@focusinlab/ratio

## Recent versions

- 1.0.2 (latest) — 2020-11-10
- 1.0.1 — 2020-11-10
- 1.0.0 — 2020-11-10

## README

# ratio

> Hook and HOC component to keep scale of components.

[![NPM](https://img.shields.io/npm/v/ratio.svg)](https://www.npmjs.com/package/ratio) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save @focusinlab/ratio
```

## Usage

```jsx
import React, { Component } from 'react'

import withRatio from 'ratio'

const MyDivA = () => <div>Div 1</div>
const DivWithRatioA = withRatio({ ratio: '1x1', className: 'mydiv' })(MyDivA)

class Example extends Component {
  render() {
    return <DivWithRatioA />
  }
}
```

## License

MIT © [focus-in-lab](https://github.com/focus-in-lab)

---
_Source: https://npm.io/package/@focusinlab/ratio · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
