react-zoom-pan-pinch
Version:
Zoom and pan html elements in easy way
46 lines (36 loc) • 1.02 kB
text/mdx
import { Meta, Story, ArgsTable, Canvas } from "@storybook/addon-docs/blocks";
import { action } from "@storybook/addon-actions";
import { TransformWrapper, TransformComponent } from "../../../components";
import { argsTypes } from "../../types/args.types";
import { Example } from "./example";
export const Template = (args) => <Example {...args} />;
<Meta
title="Examples/Keep scale"
component={TransformWrapper}
argTypes={{
...argsTypes,
"wheel.excluded": {
...argsTypes["wheel.excluded"],
defaultValue: ["wheelDisabled"],
},
"panning.excluded": {
...argsTypes["panning.excluded"],
defaultValue: ["panningDisabled"],
},
"pinch.excluded": {
...argsTypes["pinch.excluded"],
defaultValue: ["pinchDisabled"],
},
centerOnInit: {
defaultValue: true,
},
}}
/>
<br />
<Canvas>
<Story name="Keep scale">{(args) => <Template {...args} />}</Story>
</Canvas>
<ArgsTable story="Keep scale" />