DefinitelyTyped/types/react-rnd/react-rnd-tests.tsx
2018-03-07 22:03:59 +09:00

21 lines
411 B
TypeScript

import React = require('react');
import Rnd = require('react-rnd');
const onResize: Rnd.ResizeHandler = (e, direction, ref, delta, position) => {
direction === 'right';
delta.width;
delta.height;
position.x;
position.y;
};
<Rnd
className="class"
lockAspectRatio
maxWidth={100}
enableResizing={false}
resizeHandleStyles={{
top: { background: '#000' }
}}
/>;