react-resizable

WebJar for react-resizable

Лицензия

Лицензия

MIT
Категории

Категории

React Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

react-resizable
Последняя версия

Последняя версия

1.10.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

react-resizable
WebJar for react-resizable
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/STRML/react-resizable

Скачать react-resizable

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/react-resizable/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>react-resizable</artifactId>
    <version>1.10.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/react-resizable/
implementation 'org.webjars.npm:react-resizable:1.10.1'
// https://jarcasting.com/artifacts/org.webjars.npm/react-resizable/
implementation ("org.webjars.npm:react-resizable:1.10.1")
'org.webjars.npm:react-resizable:jar:1.10.1'
<dependency org="org.webjars.npm" name="react-resizable" rev="1.10.1">
  <artifact name="react-resizable" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='react-resizable', version='1.10.1')
)
libraryDependencies += "org.webjars.npm" % "react-resizable" % "1.10.1"
[org.webjars.npm/react-resizable "1.10.1"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : prop-types jar [15,16)
org.webjars.npm : react-draggable jar [4.0.3,5)

Модули Проекта

Данный проект не имеет модулей.

React-Resizable

View the Demo

A simple widget that can be resized via one or more handles.

You can either use the <Resizable> element directly, or use the much simpler <ResizableBox> element.

See the example and associated code in TestLayout and ResizableBox for more details.

Make sure you use the associated styles in /css/styles.css, as without them, you will have problems with handle placement and visibility.

You can pass options directly to the underlying DraggableCore instance by using the prop draggableOpts. See the demo for more on this.

Installation

Using npm:

$ npm install --save react-resizable

Usage

const Resizable = require('react-resizable').Resizable; // or,
const ResizableBox = require('react-resizable').ResizableBox;

// ES6
import { Resizable, ResizableBox } from 'react-resizable';

// ...
render() {
  return (
    <ResizableBox width={200} height={200} draggableOpts={{...}}
        minConstraints={[100, 100]} maxConstraints={[300, 300]}>
      <span>Contents</span>
    </ResizableBox>
  );
}

Props

These props apply to both <Resizable> and <ResizableBox>. Unknown props that are not in the list below will be passed to the child component.

{
  children: React.Element<any>,
  width: number,
  height: number,
  // Either a ReactElement to be used as handle, or a function returning an element that is fed the handle's location as its first argument.
  handle: ReactElement<any> | (resizeHandle: 's' | 'w' | 'e' | 'n' | 'sw' | 'nw' | 'se' | 'ne') => ReactElement<any>,
  // If you change this, be sure to update your css
  handleSize: [number, number] = [10, 10],
  lockAspectRatio: boolean = false,
  axis: 'both' | 'x' | 'y' | 'none' = 'both',
  minConstraints: [number, number] = [10, 10],
  maxConstraints: [number, number] = [Infinity, Infinity],
  onResizeStop?: ?(e: SyntheticEvent, data: ResizeCallbackData) => any,
  onResizeStart?: ?(e: SyntheticEvent, data: ResizeCallbackData) => any,
  onResize?: ?(e: SyntheticEvent, data: ResizeCallbackData) => any,
  draggableOpts?: ?Object,
  resizeHandles?: ?Array<'s' | 'w' | 'e' | 'n' | 'sw' | 'nw' | 'se' | 'ne'> = ['se']
};

The following props can also be used on <ResizableBox>:

{
  style?: Object
}

If a width or height is passed to <ResizableBox>'s style prop, it will be ignored as it is required for internal function.

Версии библиотеки

Версия
1.10.1
1.7.5
1.4.2
1.4.0
1.3.0
1.2.1
1.2.0
0.4.3
0.4.2