0.0.5 • Published 10 years ago

react-web-resize v0.0.5

Weekly downloads
5
License
MIT
Repository
github
Last release
10 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

5 years ago

2.0.0

7 years ago

1.3.0

7 years ago

1.1.0

7 years ago

1.0.0

8 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago