1.0.1 • Published 5 years ago
z-react-draggable v1.0.1
z-react-draggable
Draggable component. Link to demo
Install
npm install --save z-react-draggable
Usage
import React, { Component } from 'react'
import { Draggable } from 'z-react-draggable'
class Example extends Component {
render() {
return (
<Draggable>
<div>
my div
</div>
</Draggable>
)
}
}
Usage with initial position
import React, { Component } from 'react'
import { Draggable } from 'z-react-draggable'
class Example extends Component {
render() {
const initialPosition = {
x: 100,
y: 200
};
return (
<Draggable initialPosition={initialPosition}>
<div>
my div
</div>
</Draggable>
)
}
}
License
MIT © zycio
1.0.1
5 years ago