From ad0b09c3df926b636177647e05c41e7cf7ee55ad Mon Sep 17 00:00:00 2001 From: Jacob Marshall Date: Wed, 29 Jan 2025 17:42:53 +0000 Subject: [PATCH] fix(docs): fix all line and link overflow issues (#426) --- .../MdxProvider/MdxLink/MdxLink.tsx | 38 ++++++++++++------- .../MdxProvider/MdxPre/MdxPre.module.css | 5 --- .../components/MdxProvider/MdxPre/MdxPre.tsx | 3 -- .../MdxWrapper/MdxWrapper.module.css | 9 +++++ .../src/components/MdxWrapper/MdxWrapper.tsx | 11 +++++- 5 files changed, 42 insertions(+), 24 deletions(-) delete mode 100644 apps/documentation/src/components/MdxProvider/MdxPre/MdxPre.module.css create mode 100644 apps/documentation/src/components/MdxWrapper/MdxWrapper.module.css diff --git a/apps/documentation/src/components/MdxProvider/MdxLink/MdxLink.tsx b/apps/documentation/src/components/MdxProvider/MdxLink/MdxLink.tsx index a60ed9ba..e3d47641 100644 --- a/apps/documentation/src/components/MdxProvider/MdxLink/MdxLink.tsx +++ b/apps/documentation/src/components/MdxProvider/MdxLink/MdxLink.tsx @@ -1,34 +1,44 @@ -import type { JSX, AnchorHTMLAttributes } from 'react' -import { Button } from '@mantine/core' +import type { JSX, AnchorHTMLAttributes, ReactNode } from 'react' +import { Anchor } from '@mantine/core' import { Link } from 'tuono' import { IconExternalLink } from '@tabler/icons-react' -export default function MdxLink( - props: AnchorHTMLAttributes, -): JSX.Element { +interface MdxLinkProps extends AnchorHTMLAttributes { + children: ReactNode +} + +export default function MdxLink(props: MdxLinkProps): JSX.Element { if (props.href?.startsWith('http') || props.href?.startsWith('mailto')) { return ( -