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
This commit is contained in:
19
shared/editor/components/ImageZoom/index.tsx
Normal file
19
shared/editor/components/ImageZoom/index.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
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} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user