Skip to content

Commit

Permalink
Include captureOwnerStack in error handling examples
Browse files Browse the repository at this point in the history
i.e. everywhere I found mention of `"componentStack"`
  • Loading branch information
eps1lon committed Jan 14, 2025
1 parent 4b1f5cb commit 08b6a85
Show file tree
Hide file tree
Showing 6 changed files with 249 additions and 106 deletions.
1 change: 1 addition & 0 deletions src/components/MDX/CodeBlock/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ function getInlineDecorators(
line.step === 3,
'bg-green-40 border-green-40 text-green-60 dark:text-green-30':
line.step === 4,
// TODO: Some codeblocks use up to 6 steps.
}
),
})
Expand Down
15 changes: 15 additions & 0 deletions src/components/MDX/MDXComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,20 @@ const CanaryBadge = ({title}: {title: string}) => (
</span>
);

const ExperimentalBadge = ({title}: {title: string}) => (
<span
title={title}
className={
'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'
}>
<IconCanary
size="s"
className={'inline me-1 mb-0.5 text-sm text-gray-60 dark:text-gray-10'}
/>
Experimental only
</span>
);

const NextMajorBadge = ({title}: {title: string}) => (
<span
title={title}
Expand Down Expand Up @@ -511,6 +525,7 @@ export const MDXComponents = {
Note,
Canary,
CanaryBadge,
ExperimentalBadge,
NextMajor,
NextMajorBadge,
RSC,
Expand Down
Loading

0 comments on commit 08b6a85

Please sign in to comment.