1.0.2 • Published 5 years ago

react-adaptive-size v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

react-adaptive-size

A React.js hoc component that pass width infos to his wrapped component

NPM JavaScript Style Guide

Install

npm install --save react-adaptive-size

or

yarn add react-adaptive-size

Usage

import * as React from 'react';

import withAdaptiveSizes from 'react-adaptive-size';

class Example extends React.Component {
  render() {
    return (
      <React.Fragment>
        <div>Viewport width is: {this.props.viewportWidth}</div>
        <div>Viewport size is: {this.props.viewportSize.name}</div>
      </React.Fragment>
    );
  }
}
export default withAdaptiveSizes(Exemple);

License

MIT © aomati

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago