Files
outline/shared/editor/components/ImageZoom/index.tsx
Tom Moor acf74b83a8 feat: Full width images (#4389)
* feat: Full width images

* lint

* fix: Enable TOC overlaid on full size images

* Vendorize react-medium-image-zoom

* tsc

* fix

* Remove body scroll lock
2022-12-17 17:17:15 -08:00

20 lines
462 B
TypeScript

import React, { useState } from "react";
import { Controlled, ControlledProps } from "./Controlled";
import Styles from "./Styles";
export type UncontrolledProps = Omit<
ControlledProps,
"isZoomed" | "onZoomChange"
>;
export default function Zoom(props: UncontrolledProps) {
const [isZoomed, setIsZoomed] = useState(false);
return (
<>
<Styles />
<Controlled {...props} isZoomed={isZoomed} onZoomChange={setIsZoomed} />
</>
);
}