Skip to content

Commit 4f59d78

Browse files
committed
Include captureOwnerStack in error handling examples
i.e. everywhere I found mention of `"componentStack"`
1 parent e88cfc8 commit 4f59d78

File tree

6 files changed

+249
-106
lines changed

6 files changed

+249
-106
lines changed

src/components/MDX/CodeBlock/CodeBlock.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ function getInlineDecorators(
336336
line.step === 3,
337337
'bg-green-40 border-green-40 text-green-60 dark:text-green-30':
338338
line.step === 4,
339+
// TODO: Some codeblocks use up to 6 steps.
339340
}
340341
),
341342
})

src/components/MDX/MDXComponents.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,20 @@ const CanaryBadge = ({title}: {title: string}) => (
119119
</span>
120120
);
121121

122+
const ExperimentalBadge = ({title}: {title: string}) => (
123+
<span
124+
title={title}
125+
className={
126+
'text-base font-display px-1 py-0.5 font-bold bg-gray-10 dark:bg-gray-60 text-gray-60 dark:text-gray-10 rounded'
127+
}>
128+
<IconCanary
129+
size="s"
130+
className={'inline me-1 mb-0.5 text-sm text-gray-60 dark:text-gray-10'}
131+
/>
132+
Experimental only
133+
</span>
134+
);
135+
122136
const NextMajorBadge = ({title}: {title: string}) => (
123137
<span
124138
title={title}
@@ -511,6 +525,7 @@ export const MDXComponents = {
511525
Note,
512526
Canary,
513527
CanaryBadge,
528+
ExperimentalBadge,
514529
NextMajor,
515530
NextMajorBadge,
516531
RSC,

0 commit comments

Comments
 (0)