File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import Chip from " ./Chip.vue" ;
3+ </script >
4+
15<template >
2- <span
3- class =" inline-flex items-center rounded-md border border-amber-300/70 bg-amber-50 px-1.5 py-px text-[10px] leading-4 font-medium text-amber-700 dark:border-amber-600/50 dark:bg-amber-950/40 dark:text-amber-300"
4- >
5- Beta
6- </span >
6+ <Chip tone="beta">Beta</Chip >
77</template >
Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ withDefaults (defineProps <{ tone? : " info" | " beta" }>(), { tone: " info" });
3+
4+ const TONES = {
5+ info: " border-sky-300/70 bg-sky-50 text-sky-700 dark:border-sky-600/50 dark:bg-sky-950/40 dark:text-sky-300" ,
6+ beta: " border-amber-300/70 bg-amber-50 text-amber-700 dark:border-amber-600/50 dark:bg-amber-950/40 dark:text-amber-300" ,
7+ };
8+ </script >
9+
10+ <template >
11+ <span class =" inline-flex items-center rounded-md border px-1.5 py-px text-[10px] leading-4 font-medium" :class =" TONES[tone]" >
12+ <slot />
13+ </span >
14+ </template >
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { computed, watch } from "vue";
44import { summarizeCell } from " ../../../shared/compute" ;
55import { TOOLCHAIN_LABELS , type CompatibilityDocument , type ToolchainKey } from " ../../../shared/types" ;
66import CellDetails from " ./CellDetails.vue" ;
7+ import Chip from " ./Chip.vue" ;
78import CompatCell from " ./CompatCell.vue" ;
89import type { OpenCell } from " ../urlState" ;
910
@@ -138,13 +139,7 @@ const headCell = `sticky z-10 bg-neutral-50 text-center font-semibold dark:bg-ne
138139 :title =" `${group.name}@${version} on npm`"
139140 ><code >{{ version }}</code ></a >
140141 <div class =" mt-1 flex flex-wrap items-center gap-x-2 gap-y-1" >
141- <span
142- v-for =" tag in group.tags.get(version) ?? []"
143- :key =" tag"
144- class =" rounded-full bg-sky-100 px-2 py-0.5 text-[11px] font-semibold text-sky-700 dark:bg-sky-900/60 dark:text-sky-300"
145- >
146- {{ tag }}
147- </span >
142+ <Chip v-for =" tag in group .tags .get (version ) ?? []" :key =" tag " >{{ tag }}</Chip >
148143 </div >
149144 </th >
150145 <template v-for =" key in ALL_KEYS " :key =" key " >
You can’t perform that action at this time.
0 commit comments