Skip to content

Commit

Permalink
feat(playgroud): pass source path to custom render
Browse files Browse the repository at this point in the history
  • Loading branch information
Timeless0911 committed Apr 18, 2024
1 parent da86e79 commit bd71a63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/plugin-playground/src/cli/remarkPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const remarkPlugin: Plugin<[RemarkPluginProps], Root> = ({
createPlaygroundNode(node, [
['code', code],
['language', language],
['source', demoPath],
['direction', direction],
['editorPosition', editorPosition],
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type Direction = 'horizontal' | 'vertical';
export interface PlaygroundProps extends HTMLAttributes<HTMLDivElement> {
code: string;
language: string;
source?: string;
direction?: Direction;
editorPosition?: 'left' | 'right';
renderChildren?: (
Expand Down

0 comments on commit bd71a63

Please sign in to comment.