react-zoom-pan-pinch
Version:
Zoom and pan html elements in easy way
25 lines (17 loc) • 430 B
text/mdx
import { Meta } from "@storybook/addon-docs/blocks";
<Meta title="Hooks/useControls" />
Simple and easy access to the helpers inside of the `TransformWrapper`.
```tsx
const App = () => {
// Simple access to the helpers
const { instance, zoomIn, zoomOut, ...rest } = useControls();
// ...
return (
<button type="button" onClick={() => zoomIn()}>
Zoom in
</button>
);
};
```