@focusinlab/ratio
v1.0.2
Published
Hook and HOC component to keep scale of components.
Downloads
10
Readme
ratio
Hook and HOC component to keep scale of components.
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