(id: string, axis: "x" | "y")
| 17 | } |
| 18 | |
| 19 | const createTransformer = (id: string, axis: "x" | "y"): Transformer => ({ |
| 20 | id, |
| 21 | order: 100, |
| 22 | callback: (transform) => (axis === "x" ? { ...transform, x: 0 } : { ...transform, y: 0 }), |
| 23 | }) |
| 24 | |
| 25 | const createAxisConstraint = (axis: "x" | "y", transformerId: string) => (): JSXElement => { |
| 26 | const context = useDragDropContext() |
no outgoing calls
no test coverage detected