@tiaanduplessis/react-resize

1.0.0 • Public • Published

@tiaanduplessis/react-resize

package version package downloads standard-readme compliant package license make a pull request

Little resize listener component

Table of Contents

Usage

import React from 'react'
import Resize, {Breakpoint} from '@tiaanduplessis/react-resize'

const Example = () => {
  return <main>
    <Resize>{
      ({ width, height }) => <div>{width} - {height}</div>
    }</Resize>

    <Breakpoint minWidth={500}>
      <h1>Hi</h1>
    </Breakpoint>

  </main>
}

export default Example

Install

This project uses node and npm.

$ npm install @tiaanduplessis/react-resize
$ # OR
$ yarn add @tiaanduplessis/react-resize

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am "Add some feature"
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT © [[object Object]]([object Object])

Readme

Keywords

Package Sidebar

Install

npm i @tiaanduplessis/react-resize

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

12 kB

Total Files

8

Last publish

Collaborators

  • tiaanduplessis