2.1.0 • Published 4 years ago

react-web-resize v2.1.0

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

react-web-resize

an react resize component can detect dom resize.

Example

npm i react-web-resize -S

import React  from 'react';
import Resize from 'react-web-resize';
  
class Scroller extends React.Component {
  render() {
    return(
      <div style={styles.wrapper}>
        <Resize onExpand={() => {//do something}}
          onShrink={() => {//do something}}/>
        {{this.props.children}}
      </div>
    );
  }
}
  
let styles = {
  wrapper: {
    width: 300,
    height: 200,
    position: 'relative',
  }
};
  
export default Scroller;

Note

  1. wrapper's css position need to no static. relative or absolute
2.1.0

4 years ago

2.0.0

5 years ago

1.3.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago