mirror of
https://github.com/zen-browser/docs.git
synced 2025-07-07 17:05:34 +02:00
Updated img component and added lint script
This commit is contained in:
parent
af0f6207d2
commit
d3d1b8e56b
2 changed files with 7 additions and 4 deletions
|
@ -29,9 +29,11 @@ export default async function Page(props: {
|
|||
components={{
|
||||
...defaultMdxComponents,
|
||||
a: createRelativeLink(source, page),
|
||||
img: (props: React.ImgHTMLAttributes<HTMLImageElement>) => (
|
||||
<ImageZoom {...props} />
|
||||
),
|
||||
img: (props: React.ImgHTMLAttributes<HTMLImageElement>) => {
|
||||
const { src, ...rest } = props;
|
||||
if (typeof src !== "string") return null;
|
||||
return <ImageZoom src={src} {...rest} />;
|
||||
},
|
||||
pre: (props) => (
|
||||
<CodeBlock {...props}>
|
||||
<Pre>{props.children}</Pre>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue