UNPKG

mdx-prompt

Version:

Use MDX to render high quality LLM prompts

12 lines 591 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { renderMDX } from './index'; import { Prompt, Purpose, Instructions } from './components/index'; const MyPrompt = () => { return (_jsxs(Prompt, { children: ["Please do something cool:", _jsx(Purpose, { children: "To do what you are told" }), _jsx(Instructions, { instructions: ['Do something', 'Do something else'] })] })); }; // Render the component to string inside an async IIFE (async () => { const output = await renderMDX(_jsx(MyPrompt, {})); console.log(output); })(); //# sourceMappingURL=cli.js.map