2.0.0 • Published 5 years ago

@fenderdigital/react-reposition-element v2.0.0

Weekly downloads
1
License
UNLICENSED
Repository
-
Last release
5 years ago

RepositionElement for Fender React UI Kit

Description

A component that wraps an element and respositions it on the canvas.

Installation and Usage

yarn add @fenderdigital/react-reposition-element --save
import RepositionElement from '@fenderdigital/react-reposition-element';

Props

  • children - renders a node.
  • dimensions - desired width/height of element being repositioned.
  • isActive - determines when a element is in the repositioned state.
  • onReposition - passes its current active state.
  • position - can be in top/left, top/right, bottom/left, bottom/right.
  • transition - a css transition effect.
  • zIndex - css z-index value.
propNamepropTypedefaultValueisRequired
childrennodenull-
dimensionsobject{ height: 240, width: 426 }-
isActiveboolfalse-
onRepositionfunc() => {}-
positionobject{ top: 0, right: 0 }-
transitionstring'all .3s ease'-
zIndexstring'6'-

Development

Check the Monorepo README for development documentation.