Skip to content

Commit 5fe0f53

Browse files
committed
chore: removed index and used flag
1 parent e2e3cd2 commit 5fe0f53

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/mermaid/src/docs/.vitepress/components/EditorSelectionModal.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ interface EditorColumn {
1010
title: string;
1111
description: string;
1212
redirectUrl: string;
13+
highlighted?: boolean;
1314
features: Feature[];
1415
}
1516
@@ -30,6 +31,7 @@ const editorColumns: EditorColumn[] = [
3031
description: 'Advanced features, free account',
3132
redirectUrl:
3233
'https://www.mermaidchart.com/app/sign-up?utm_source=mermaid_js&utm_medium=editor_selection&utm_campaign=mermaid_chart',
34+
highlighted: true,
3335
features: [
3436
{ iconUrl: '/icons/icon-folder.svg', featureName: 'Storage' },
3537
{ iconUrl: '/icons/icon-terminal.svg', featureName: 'Code editor' },
@@ -87,13 +89,12 @@ onUnmounted(() => {
8789
>
8890
<div class="flex flex-row relative top-[8%] gap-4 p-4">
8991
<div
90-
v-for="(column, index) in editorColumns"
91-
:key="index"
92+
v-for="column in editorColumns"
9293
class="w-80 flex relative flex-col items-center justify-start bg-[#dceef1] p-6 m-6 text-gray-800 shadow-sm"
93-
:class="index === 1 ? 'bg-white rounded-b-lg' : 'bg-[#DCEEF1] rounded-lg'"
94+
:class="column.highlighted ? 'bg-white rounded-b-lg' : 'bg-[#DCEEF1] rounded-lg'"
9495
>
9596
<div
96-
v-if="index === 1"
97+
v-if="column.highlighted"
9798
class="absolute -top-8 w-full rounded-t-3xl bg-[#E0095F] py-2 flex items-center justify-center shadow-md"
9899
>
99100
<p class="text-sm font-semibold text-white">Best for collaboration</p>
@@ -110,7 +111,9 @@ onUnmounted(() => {
110111
:href="column.redirectUrl"
111112
target="_blank"
112113
class="mb-4 flex h-10 w-full items-center justify-center rounded-xl hover:bg-[#272040] hover:text-white"
113-
:class="index === 1 ? 'bg-[#1e1a2e] text-[#BEDDE3]' : 'bg-[#BEDDE3] text-[#1E1A2E]'"
114+
:class="
115+
column.highlighted ? 'bg-[#1e1a2e] text-[#BEDDE3]' : 'bg-[#BEDDE3] text-[#1E1A2E]'
116+
"
114117
>
115118
Start free
116119
</a>

0 commit comments

Comments
 (0)