Skip to content

Commit 24e29e8

Browse files
committed
refactor: Render JSON data element based on debug var in shikiComponent
1 parent 9663799 commit 24e29e8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/test-case-component/src/components/shikiComponent.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ export function ShikiComponent({
3636
</Carousel>
3737
</div>
3838

39-
<details>
40-
<summary>JSON</summary>
41-
<pre className="max-w-xl overflow-auto">
42-
{JSON.stringify(data, null, 2)}
43-
</pre>
44-
</details>
39+
{debug && (
40+
<details>
41+
<summary>JSON</summary>
42+
<pre className="max-w-xl overflow-auto">
43+
{JSON.stringify(data, null, 2)}
44+
</pre>
45+
</details>
46+
)}
4547
</div>
4648
);
4749
}

0 commit comments

Comments
 (0)