mirror of
https://github.com/zen-browser/docs.git
synced 2025-07-07 17:05:34 +02:00
Simplified img component in page.tsx
This commit is contained in:
parent
cf3b441e2e
commit
bc311a4ac7
2 changed files with 2 additions and 4 deletions
Binary file not shown.
Before Width: | Height: | Size: 951 KiB After Width: | Height: | Size: 719 KiB |
|
@ -29,10 +29,8 @@ export default async function Page(props: {
|
|||
components={{
|
||||
...defaultMdxComponents,
|
||||
a: createRelativeLink(source, page),
|
||||
img: (props: React.ImgHTMLAttributes<HTMLImageElement>) => {
|
||||
const { src, ...rest } = props;
|
||||
if (typeof src !== "string") return null;
|
||||
return <ImageZoom src={src} {...rest} />;
|
||||
img: (props) => {
|
||||
return <ImageZoom {...props} />;
|
||||
},
|
||||
pre: (props) => (
|
||||
<CodeBlock {...props}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue