Render technical diagrams with mermaid
This commit is contained in:
12
docs/.vitepress/theme/components/NamedMermaidDiagram.vue
Normal file
12
docs/.vitepress/theme/components/NamedMermaidDiagram.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import MermaidDiagram from './MermaidDiagram.vue';
|
||||
import { diagramSources } from './diagramSources';
|
||||
|
||||
const props = defineProps<{
|
||||
name: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<MermaidDiagram :chart="diagramSources[props.name] || 'flowchart TB\\nA[Diagram not found]'" />
|
||||
</template>
|
||||
Reference in New Issue
Block a user