-
+
diff --git a/src/components/MDX/CodeDiagram.tsx b/src/components/MDX/CodeDiagram.tsx
index 7a503f068..8ae246d12 100644
--- a/src/components/MDX/CodeDiagram.tsx
+++ b/src/components/MDX/CodeDiagram.tsx
@@ -26,14 +26,14 @@ export function CodeDiagram({children, flip = false}: CodeDiagramProps) {
});
if (flip) {
return (
-
+
);
}
return (
-
+
diff --git a/src/components/MDX/ConsoleBlock.tsx b/src/components/MDX/ConsoleBlock.tsx
index de6201b6a..f2bd21cea 100644
--- a/src/components/MDX/ConsoleBlock.tsx
+++ b/src/components/MDX/ConsoleBlock.tsx
@@ -40,33 +40,33 @@ function ConsoleBlock({level = 'error', children}: ConsoleBlockProps) {
return (
-
+
-
-
+
- {level === 'error' &&
}
- {level === 'warning' &&
}
+ {level === 'error' &&
}
+ {level === 'warning' &&
}
{message}
diff --git a/src/components/MDX/Diagram.tsx b/src/components/MDX/Diagram.tsx
index 7920661da..a44c0a9ab 100644
--- a/src/components/MDX/Diagram.tsx
+++ b/src/components/MDX/Diagram.tsx
@@ -15,8 +15,8 @@ interface DiagramProps {
function Caption({text}: {text: string}) {
return (
-
-
+
+
{text}
@@ -32,7 +32,7 @@ export function Diagram({
captionPosition,
}: DiagramProps) {
return (
-
+
{captionPosition === 'top' && }
+
{children}
);
diff --git a/src/components/MDX/ExpandableCallout.tsx b/src/components/MDX/ExpandableCallout.tsx
index 372c070de..06841fbf7 100644
--- a/src/components/MDX/ExpandableCallout.tsx
+++ b/src/components/MDX/ExpandableCallout.tsx
@@ -60,12 +60,12 @@ function ExpandableCallout({children, type}: ExpandableCalloutProps) {
-
+
{variant.title}
diff --git a/src/components/MDX/ExpandableExample.tsx b/src/components/MDX/ExpandableExample.tsx
index 1ad1e0313..1d9683043 100644
--- a/src/components/MDX/ExpandableExample.tsx
+++ b/src/components/MDX/ExpandableExample.tsx
@@ -47,10 +47,10 @@ function ExpandableExample({children, excerpt, type}: ExpandableExampleProps) {
setIsExpanded(e.currentTarget!.open);
}}
className={cn(
- 'my-12 rounded-2xl shadow-inner-border dark:shadow-inner-border-dark relative',
+ 'relative my-12 rounded-2xl shadow-inner-border dark:shadow-inner-border-dark',
{
- 'dark:bg-opacity-20 dark:bg-purple-60 bg-purple-5': isDeepDive,
- 'dark:bg-opacity-20 dark:bg-yellow-60 bg-yellow-5': isExample,
+ 'bg-purple-5 dark:bg-purple-60 dark:bg-opacity-20': isDeepDive,
+ 'bg-yellow-5 dark:bg-yellow-60 dark:bg-opacity-20': isExample,
}
)}>
{isDeepDive && (
<>
-
+
Deep Dive
>
)}
{isExample && (
<>
-
+
Example
>
)}
@@ -92,9 +92,9 @@ function ExpandableExample({children, excerpt, type}: ExpandableExampleProps) {
{children.slice(1)}
diff --git a/src/components/MDX/Heading.tsx b/src/components/MDX/Heading.tsx
index 707e5e3ca..eee29f7db 100644
--- a/src/components/MDX/Heading.tsx
+++ b/src/components/MDX/Heading.tsx
@@ -39,7 +39,7 @@ const Heading = forwardRefWithAs(function Heading(
height="1em"
viewBox="0 0 13 13"
xmlns="http://www.w3.org/2000/svg"
- className="text-gray-70 ml-2 h-5 w-5">
+ className="ml-2 h-5 w-5 text-gray-70">
@@ -54,7 +54,7 @@ const Heading = forwardRefWithAs(function Heading(
export const H1 = ({className, ...props}: HeadingProps) => (
);
@@ -63,7 +63,7 @@ export const H2 = ({className, ...props}: HeadingProps) => (
(
as="h3"
className={cn(
className,
- 'text-2xl font-display leading-9 text-primary dark:text-primary-dark font-bold my-6'
+ 'my-6 font-display text-2xl font-bold leading-9 text-primary dark:text-primary-dark'
)}
{...props}
/>
@@ -84,7 +84,7 @@ export const H3 = ({className, ...props}: HeadingProps) => (
export const H4 = ({className, ...props}: HeadingProps) => (
);
diff --git a/src/components/MDX/InlineCode.tsx b/src/components/MDX/InlineCode.tsx
index 4a87c2a53..bd3ac7761 100644
--- a/src/components/MDX/InlineCode.tsx
+++ b/src/components/MDX/InlineCode.tsx
@@ -14,10 +14,10 @@ function InlineCode({
return (
+
{children}
);
diff --git a/src/components/MDX/MDXComponents.module.css b/src/components/MDX/MDXComponents.module.css
index 9840e77ce..746739632 100644
--- a/src/components/MDX/MDXComponents.module.css
+++ b/src/components/MDX/MDXComponents.module.css
@@ -4,7 +4,7 @@
/* Stop purging. */
.markdown p {
- @apply mb-4 leading-7 whitespace-pre-wrap text-gray-70;
+ @apply mb-4 whitespace-pre-wrap leading-7 text-gray-70;
}
.markdown ol {
@@ -30,7 +30,7 @@
}
.markdown code {
- @apply text-gray-70 bg-card dark:bg-card-dark p-1 rounded-lg no-underline;
+ @apply rounded-lg bg-card p-1 text-gray-70 no-underline dark:bg-card-dark;
font-size: 90%;
}
@@ -39,5 +39,5 @@
}
.markdown a {
- @apply inline text-link dark:text-link-dark break-normal border-b border-link border-opacity-0 hover:border-opacity-100 duration-100 ease-in transition leading-normal;
+ @apply inline break-normal border-b border-link border-opacity-0 leading-normal text-link transition duration-100 ease-in hover:border-opacity-100 dark:text-link-dark;
}
diff --git a/src/components/MDX/MDXComponents.tsx b/src/components/MDX/MDXComponents.tsx
index ba531c9f0..5fa1f9a21 100644
--- a/src/components/MDX/MDXComponents.tsx
+++ b/src/components/MDX/MDXComponents.tsx
@@ -36,15 +36,15 @@ function CodeStep({children, step}: {children: any; step: number}) {
@@ -54,7 +54,7 @@ function CodeStep({children, step}: {children: any; step: number}) {
}
const P = (p: JSX.IntrinsicElements['p']) => (
-
+
);
const Strong = (strong: JSX.IntrinsicElements['strong']) => (
@@ -62,13 +62,13 @@ const Strong = (strong: JSX.IntrinsicElements['strong']) => (
);
const OL = (p: JSX.IntrinsicElements['ol']) => (
-
+
);
const LI = (p: JSX.IntrinsicElements['li']) => (
-
+
);
const UL = (p: JSX.IntrinsicElements['ul']) => (
-
+
);
const Divider = () => (
@@ -93,9 +93,9 @@ const Blockquote = ({
}: JSX.IntrinsicElements['blockquote']) => {
return (
- {children}
+ {children}
);
};
@@ -110,9 +110,9 @@ function LearnMore({
}) {
return (
<>
-
+
-
+
Ready to learn this topic?
{children}
@@ -123,12 +123,12 @@ function LearnMore({
href={path}
type="primary">
Read More
-
+
) : null}
-
+
>
);
}
@@ -137,7 +137,7 @@ function ReadBlogPost({path}: {path: string}) {
return (
Read Post
-
+
);
}
@@ -190,8 +190,8 @@ function AuthorCredit({
authorLink: string;
}) {
return (
-
-
+
+
Illustrated by{' '}
{authorLink ? (
@@ -233,16 +233,16 @@ function Illustration({
const {isInBlock} = React.useContext(IllustrationContext);
return (
-
+
{caption ? (
-
+
{caption}
) : null}
@@ -270,11 +270,11 @@ function IllustrationBlock({
);
const images = imageInfos.map((info, index) => (
-
+
{info.caption ? (
-
+
{info.caption}
) : null}
@@ -282,7 +282,7 @@ function IllustrationBlock({
));
return (
-
+
{sequential ? (
{images.map((x: any, i: number) => (
@@ -357,7 +357,7 @@ function YouTubeIframe(props: any) {
return (
;
+ return {children}
;
},
Pitfall,
Deprecated,
diff --git a/src/components/MDX/PackageImport.tsx b/src/components/MDX/PackageImport.tsx
index 5e2da820e..fd4baf8b0 100644
--- a/src/components/MDX/PackageImport.tsx
+++ b/src/components/MDX/PackageImport.tsx
@@ -30,7 +30,7 @@ export function PackageImport({children}: PackageImportProps) {
}
});
return (
-
+
diff --git a/src/components/MDX/Sandpack/Console.tsx b/src/components/MDX/Sandpack/Console.tsx
index 23194c870..729646991 100644
--- a/src/components/MDX/Sandpack/Console.tsx
+++ b/src/components/MDX/Sandpack/Console.tsx
@@ -156,7 +156,7 @@ export const SandpackConsole = ({visible}: {visible: boolean}) => {
}
return (
-
+
{isExpanded && (
-
-
+
+
{logs.map(({data, id, method}) => {
return (
diff --git a/src/components/MDX/Sandpack/CustomPreset.tsx b/src/components/MDX/Sandpack/CustomPreset.tsx
index 6e0862564..2077e8664 100644
--- a/src/components/MDX/Sandpack/CustomPreset.tsx
+++ b/src/components/MDX/Sandpack/CustomPreset.tsx
@@ -74,7 +74,7 @@ const SandboxShell = memo(function SandboxShell({
return (
<>
@@ -95,7 +95,7 @@ const SandboxShell = memo(function SandboxShell({
{(isExpandable || isExpanded) && (