Skip to content

Commit

Permalink
Fix inline code highlight examples
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverWales committed May 6, 2024
1 parent bd73170 commit 389e917
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ function Demo() {
return (
<Text>
You can highlight code inline:{' '}
<InlineCodeHighlight code="" language="tsx" />. Is not that cool?
<InlineCodeHighlight code={'<InlineCodeHighlight code="" language="tsx" />'} language="tsx" />
. Is not that cool?
</Text>
);
}
Expand All @@ -19,8 +20,9 @@ function Demo() {
function Demo() {
return (
<Text>
You can highlight code inline: <InlineCodeHighlight code="" language="tsx" />. Is not that
cool?
You can highlight code inline:{' '}
<InlineCodeHighlight code={'<InlineCodeHighlight code="" language="tsx" />'} language="tsx" />
. Is not that cool?
</Text>
);
}
Expand Down
12 changes: 8 additions & 4 deletions packages/@mantine/code-highlight/src/CodeHighlight.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,14 @@ export function Inline() {
return (
<div style={{ padding: 40 }}>
<p>
Hello there! this is <InlineCodeHighlight code="" language="tsx" /> some code Lorem ipsum
dolor sit amet consectetur adipisicing elit. Aliquid reiciendis, facilis repudiandae vero
mollitia non dolorum cupiditate assumenda odio unde quaerat beatae explicabo veritatis nam
temporibus! Quibusdam quod enim voluptatibus?
Hello there! this is{' '}
<InlineCodeHighlight
code={'<InlineCodeHighlight code="" language="tsx" />'}
language="tsx"
/>{' '}
some code Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid reiciendis,
facilis repudiandae vero mollitia non dolorum cupiditate assumenda odio unde quaerat beatae
explicabo veritatis nam temporibus! Quibusdam quod enim voluptatibus?
</p>
</div>
);
Expand Down

0 comments on commit 389e917

Please sign in to comment.