react-adaptive-size
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i react-adaptive-size

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

47.3 kB

Total Files

10

Last publish

Collaborators

  • aomati