Skip to content

Commit 92474ca

Browse files
fix + feedback
1 parent 29d30ff commit 92474ca

4 files changed

Lines changed: 51 additions & 4 deletions

File tree

apps/site/components/__design__/mermaid.stories.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
2+
import dedent from 'dedent';
23
import { VFile } from 'vfile';
34

45
import { compile } from '@/next.mdx.compiler.mjs';
@@ -8,9 +9,9 @@ type Props = { children: string };
89
type Story = StoryObj<Props>;
910
type Meta = MetaObj<Props>;
1011

11-
export const Default: Story = {
12+
export const Mermaid: Story = {
1213
args: {
13-
children: `\`\`\`mermaid
14+
children: dedent`\`\`\`mermaid
1415
graph LR
1516
A[Client] --> B(Load Balancer)
1617
B --> C{Server 1}
@@ -20,7 +21,7 @@ B --> D{Server 2}
2021
};
2122

2223
export default {
23-
title: 'Design System/Mermaid',
24+
title: 'Design System',
2425
render: (_, { loaded: { Content } }) => Content,
2526
loaders: [
2627
async ({ args }) => {

apps/site/next.mdx.plugins.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import rehypeShikiji from './next.mdx.shiki.mjs';
1616
*/
1717
export const REHYPE_PLUGINS = [
1818
// Transforms Mermaid code blocks into SVGs
19-
// !!! This plugin must be before `rehypeShikiji` !!!
19+
// note: needs to be imported before rehype-shiki to prevent transforming into code-blocks
2020
rehypeMermaid,
2121
// Generates `id` attributes for headings (H1, ...)
2222
rehypeSlug,

apps/site/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"next": "15.2.0",
5757
"next-intl": "~3.26.5",
5858
"next-themes": "~0.4.4",
59+
"playwright": "^1.51.0",
5960
"postcss": "~8.5.3",
6061
"postcss-calc": "~10.1.1",
6162
"postcss-import": "~16.1.0",

package-lock.json

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)