From b3955bd85c9173f18a34c4b146feeb9ade9d297b Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sat, 3 Feb 2024 11:23:19 +0530 Subject: [PATCH 1/3] Add block sample --- src/lib/components/Preset.svelte | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/lib/components/Preset.svelte b/src/lib/components/Preset.svelte index 8c8ca8e6f..de370e48e 100644 --- a/src/lib/components/Preset.svelte +++ b/src/lib/components/Preset.svelte @@ -122,7 +122,22 @@ x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec] y-axis "Revenue (in $)" 4000 --> 11000 bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000] - line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]` + line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]`, + Block: `block-beta +columns 1 + db(("DB")) + blockArrow<["   "]>(down) + block:ID + columns 3 + A + B["A wide one in the middle"] + C + end + space + D + ID --> D + C --> D + style B fill:#f9F,stroke:#333,stroke-width:4px` }; type SampleTypes = keyof typeof samples; @@ -135,10 +150,10 @@ }; // Adding in this array will add an icon to the preset menu - const newDiagrams: SampleTypes[] = ['Mindmap', 'QuadrantChart', 'XYChart']; + const newDiagrams: SampleTypes[] = ['QuadrantChart', 'XYChart', 'Block']; const diagramOrder: SampleTypes[] = [ - 'Sequence', 'Flow', + 'Sequence', 'Class', 'State', 'ER', @@ -148,7 +163,8 @@ 'Pie', 'Mindmap', 'QuadrantChart', - 'XYChart' + 'XYChart', + 'Block' ]; @@ -156,7 +172,7 @@
{#each diagramOrder as sample}