30 lines
778 B
Plaintext
30 lines
778 B
Plaintext
---
|
|
interface Props {
|
|
trigger: string;
|
|
title: string;
|
|
items: string[];
|
|
note?: string;
|
|
}
|
|
|
|
const { trigger, title, items, note } = Astro.props;
|
|
---
|
|
|
|
<span class="hover-info" tabindex="0">
|
|
<span class="hover-info-trigger">{trigger}</span>
|
|
<span class="hover-info-panel">
|
|
<span class="block font-medium text-foreground">{title}</span>
|
|
{note && <span class="mt-1 block text-muted-foreground">{note}</span>}
|
|
{items.length > 0 ? (
|
|
<span class="mt-2 flex flex-wrap gap-1">
|
|
{items.map((item) => (
|
|
<span class="rounded border border-border bg-secondary/60 px-1.5 py-0.5 font-mono text-[10px] text-foreground/80">
|
|
{item}
|
|
</span>
|
|
))}
|
|
</span>
|
|
) : (
|
|
<span class="mt-1 block text-muted-foreground">暂无频段数据</span>
|
|
)}
|
|
</span>
|
|
</span>
|