mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:21:10 +02:00
fix(shared-ui): rename Tag type to TagType to avoid collision with Svelte internals
Tag import from @manacore/shared-icons (component) collided with Tag type import from constants, causing "Identifier 'Tag' has already been declared" in Svelte 5 builds. Renamed type to TagType. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
97798e5382
commit
8d071236f6
1 changed files with 6 additions and 6 deletions
|
|
@ -1,13 +1,13 @@
|
|||
<script lang="ts">
|
||||
import { PencilSimple, Tag as TagIcon, Trash } from '@manacore/shared-icons';
|
||||
import { DEFAULT_TAG_COLOR } from './constants';
|
||||
import type { Tag } from './constants';
|
||||
import type { Tag as TagType } from './constants';
|
||||
|
||||
interface Props {
|
||||
tags: Tag[];
|
||||
onEdit?: (tag: Tag) => void;
|
||||
onDelete?: (tag: Tag) => void;
|
||||
onClick?: (tag: Tag) => void;
|
||||
tags: TagType[];
|
||||
onEdit?: (tag: TagType) => void;
|
||||
onDelete?: (tag: TagType) => void;
|
||||
onClick?: (tag: TagType) => void;
|
||||
layout?: 'grid' | 'list';
|
||||
emptyMessage?: string;
|
||||
emptyDescription?: string;
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
loading = false,
|
||||
}: Props = $props();
|
||||
|
||||
function getTagColor(tag: Tag): string {
|
||||
function getTagColor(tag: TagType): string {
|
||||
return tag.color ?? tag.style?.color ?? DEFAULT_TAG_COLOR;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue