Skip to content

Commit 67359b0

Browse files
committed
feat: Create Before, During, After components for shikiComponent
1 parent c0e109f commit 67359b0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,27 @@ export const ShikiComponent: React.FC<{ data: any }> = ({ data }) => {
3333
</div>
3434
);
3535
};
36+
37+
const Before = ({ content }: { content: string }) => {
38+
return <div className="p-4" dangerouslySetInnerHTML={{ __html: content }} />;
39+
};
40+
41+
const During = ({ content }: { content: string }) => {
42+
if (content) {
43+
console.log("🧄", content);
44+
45+
return (
46+
<div className="p-4" dangerouslySetInnerHTML={{ __html: content }} />
47+
);
48+
}
49+
return <></>;
50+
};
51+
52+
const After = ({ content }: { content: string }) => {
53+
return (
54+
<div
55+
className="flex flex-col gap-y-4 p-4"
56+
dangerouslySetInnerHTML={{ __html: content }}
57+
/>
58+
);
59+
};

0 commit comments

Comments
 (0)