1.0.4 • Published 5 years ago

react-resizer-module v1.0.4

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

React Resizer Module

Wrapping component, that allows to resize wrapper with handles (width, height and both at the same time).

Installing:

$ npm install react-resizer-module

React Resizer example code

import React from 'react';
import Resizer from 'react-resizer-module'

const App = () => {
  return (
    <Resizer initialWidth={100} initialHeight={200}>
    // ...
    </Resizer>
  );
}

export default App;

Component params

initialWidth={100} - expects number that represents initial width in pixels\ initialHeight={200} - expects number that represents initial height in pixels\ widthHandleClass={'your-width-handle-class another-class'} - expects string, adds classes to width handle\ heightHandleClass={'your-height-handle-class another-class'} - expects string, adds classes to height handle\ widthAndHeightHandleClass={'w-and-h-class another-class'} - expects string, adds classes to width and height handle\ childrenWrapId={'your-children-wrap-id'} - expects string, adds id to children wrap\ childrenWrapClass={'your-children-wrap-class'} - expects string, adds class to children wrap

{
  initialWidth: number,
  initialHeight: number,
  widthHandleClass: string,
  heightHandleClass: string,
  widthAndHeightHandleClass: string,
  childrenWrapId: string,
  childrenWrapClass: string
};

Clone, build, typecheck

Main JS file src/index.js\ Main CSS file src/styles.css

Clone

$ git clone https://github.com/HelloBanksy/react-resizer-module.git
$ cd react-resizer-module
$ npm install

Build

$ npm run build

Typecheck with Flow

$ npm run flow-status