react-resize-component

0.1.7 • Public • Published

React Resize Component

A simple component that you can use to wrap your component and allows to resize its width and height.

Installation

This module requires only React and ReactDOM to work. You don't need jQuery for this component to work.

**Simply run: **

yarn add react-resize-component --save

Usage

// Using ES6
import React from 'react';
import ReactDOM from 'react-dom';
import ResizeComponent from 'react-resize-component';
 
class SimpleApp extends React.Component {
  render() {
  
    // Custom CSS for ResizeBox 
    let customStyles = {
    };
    
    return (
      <ResizableBox position="right" width={300} maxWidth={350} className="my-custom-class-name" style={customStyles}>
        // Your can add your child component here
      </ResizableBox>;
    );
  }
}

export default SimpleApp;

License

MIT

Package Sidebar

Install

npm i react-resize-component

Weekly Downloads

6

Version

0.1.7

License

MIT

Last publish

Collaborators

  • nucab