1.0.0 • Published 5 years ago

@tiaanduplessis/react-resize v1.0.0

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

@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)

1.0.0

5 years ago