react-motion-window
v1.2.8
Published
window app using react & react-motion
Readme
react-motion-window
window app using react & react-motion
This package is included in react-motion-components.
Install
npm install --save react-motion-windowUsage
import * as React from 'react';
import Window from 'react-motion-window';
export default class App extends Component {
render() {
return (
<div>
<div>
<button
onClick={() => {
this.window.addWindow();
}}
>
add window
</button>
</div>
<div>
<button
onClick={() => {
this.window.removeWindow();
}}
>
remove window
</button>
</div>
<Window
ref={window => (this.window = window)}
width={200}
height={200}
position="center"
direction="top"
titlebar={{
use: true,
title: 'test'
}}
>
test
</Window>
</div>
);
}
}License
MIT © pjb0811
