react-resize-component
v0.1.7
Published
Resizable component for React.
Downloads
12
Readme
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