re-resizable
Advanced tools
Comparing version 4.4.0 to 4.4.1
@@ -297,3 +297,3 @@ 'use strict'; | ||
var base = document.getElementById(this.baseSizeId); | ||
if (!base) return; | ||
if (!base || !parent) return; | ||
if (!(parent instanceof HTMLElement) || !(base instanceof Node)) return; | ||
@@ -300,0 +300,0 @@ parent.removeChild(base); |
@@ -295,3 +295,3 @@ import { createElement, Component } from 'react'; | ||
var base = document.getElementById(this.baseSizeId); | ||
if (!base) return; | ||
if (!base || !parent) return; | ||
if (!(parent instanceof HTMLElement) || !(base instanceof Node)) return; | ||
@@ -298,0 +298,0 @@ parent.removeChild(base); |
{ | ||
"name": "re-resizable", | ||
"version": "4.4.0", | ||
"version": "4.4.1", | ||
"description": "Resizable component for React.", | ||
@@ -5,0 +5,0 @@ "title": "re-resizable", |
@@ -17,16 +17,30 @@ <p align="center"><img src ="https://github.com/bokuweb/re-resizable/blob/master/logo.png?raw=true" /></p> | ||
- [Demo](#Demo) | ||
- [Install](#install) | ||
- [Usage](#usage) | ||
- [Props](#props) | ||
- [Method](#method) | ||
- [Test](#test) | ||
- [Related](#related) | ||
- [Changelog](#changelog) | ||
- [License](#license) | ||
* [Screenshot](#Screenshot) | ||
* [Live Demo](#live-demo) | ||
* [Storybook](#storybook) | ||
* [CodeSandbox](#CodeSandbox) | ||
* [Install](#install) | ||
* [Usage](#usage) | ||
* [Props](#props) | ||
* [Instance API](#instance-api) | ||
* [updateSize(size: { width: number | string, height: number | string }): void](#updateSize-void) | ||
* [Test](#test) | ||
* [Related](#related) | ||
* [Changelog](#changelog) | ||
* [License](#license) | ||
## Demo | ||
## Screenshot | ||
![screenshot](https://github.com/bokuweb/re-resizable/blob/master/docs/screenshot.gif?raw=true) | ||
## Live Demo | ||
### Storybook | ||
[Storybook](http://bokuweb.github.io/re-resizable/) | ||
### CodeSandbox | ||
[CodeSandbox](https://codesandbox.io/s/ll587k677z) | ||
## Install | ||
@@ -55,2 +69,4 @@ | ||
If you use `size` props, please manage state by yourself. | ||
``` javascript | ||
@@ -174,3 +190,3 @@ <Resizable | ||
``` | ||
```javascript | ||
type ResizeStartCallback = ( | ||
@@ -191,3 +207,3 @@ e: SyntheticMouseEvent<HTMLDivElement> | SyntheticTouchEvent<HTMLDivElement>, | ||
``` | ||
```javascript | ||
type ResizeCallback = ( | ||
@@ -207,3 +223,3 @@ event: MouseEvent | TouchEvent, | ||
``` | ||
```javascript | ||
type ResizeCallback = ( | ||
@@ -219,5 +235,5 @@ event: MouseEvent | TouchEvent, | ||
## method | ||
## Instance API | ||
#### `updateSize(object size)` | ||
#### `updateSize(size: { width: number | string, height: number | string }): void` | ||
@@ -229,3 +245,3 @@ Update component size. | ||
``` js | ||
```javascript | ||
class YourComponent extends Component { | ||
@@ -256,4 +272,3 @@ | ||
If you have a bug to report, please reproduce the bug in [WebpackBin]( | ||
https://www.webpackbin.com/bins/-Kvnrpd3GSG6-z0tpgH_) to help us easily isolate it. | ||
If you have a bug to report, please reproduce the bug in [CodeSandbox](https://codesandbox.io/s/ll587k677z) to help us easily isolate it. | ||
@@ -260,0 +275,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112013
526