Skip to content

Commit c8e688e

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

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
@@ -120,6 +120,20 @@ const CanaryBadge = ({title}: {title: string}) => (
120120
</span>
121121
);
122122

123+
const ExperimentalBadge = ({title}: {title: string}) => (
124+
<span
125+
title={title}
126+
className={
127+
'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'
128+
}>
129+
<IconCanary
130+
size="s"
131+
className={'inline me-1 mb-0.5 text-sm text-gray-60 dark:text-gray-10'}
132+
/>
133+
Experimental only
134+
</span>
135+
);
136+
123137
const NextMajorBadge = ({title}: {title: string}) => (
124138
<span
125139
title={title}
@@ -509,6 +523,7 @@ export const MDXComponents = {
509523
Note,
510524
Canary,
511525
CanaryBadge,
526+
ExperimentalBadge,
512527
NextMajor,
513528
NextMajorBadge,
514529
RSC,

0 commit comments

Comments
 (0)