1.0.2 • Published 4 years ago

@focusinlab/ratio v1.0.2

Weekly downloads
12
License
MIT
Repository
github
Last release
4 years ago

ratio

Hook and HOC component to keep scale of components.

NPM JavaScript Style Guide

Install

npm install --save @focusinlab/ratio

Usage

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

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago