robot-learning-tutorial / app /src /components /MermaidDemo.astro
thibaud frere
update
b9e7b9b
raw
history blame
280 Bytes
---
export interface Props {
code?: string;
}
const { code = `graph TD\n A[Start] --> B{Is it working?}\n B -- Yes --> C[Great!]\n B -- No --> D[Fix it]\n D --> B` } = Astro.props;
---
<pre class="mermaid">{code}</pre>
<style>.mermaid { max-width: 100%; }</style>