@fenderdigital/react-reposition-element

2.0.0 • Public • Published

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.
propName propType defaultValue isRequired
children node null -
dimensions object { height: 240, width: 426 } -
isActive bool false -
onReposition func () => {} -
position object { top: 0, right: 0 } -
transition string 'all .3s ease' -
zIndex string '6' -

Development

Check the Monorepo README for development documentation.

/@fenderdigital/react-reposition-element/

    Package Sidebar

    Install

    npm i @fenderdigital/react-reposition-element

    Weekly Downloads

    1

    Version

    2.0.0

    License

    UNLICENSED

    Unpacked Size

    8.29 kB

    Total Files

    6

    Last publish

    Collaborators

    • stevenhuynh
    • markv242
    • coopercodecomposer
    • sherbert
    • jcuanan
    • derduher
    • philipyun
    • theloopla
    • jemnon