2.0.0 • Published 5 years ago
@fenderdigital/react-reposition-element v2.0.0
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.