diff --git a/src/components/ui/Tag.tsx b/src/components/ui/Tag.tsx index 38395f9..0311e8f 100644 --- a/src/components/ui/Tag.tsx +++ b/src/components/ui/Tag.tsx @@ -1,12 +1,16 @@ -interface TagProps { +interface TagProps extends React.HTMLAttributes { children: React.ReactNode accent?: boolean className?: string + // EditableText/TagListEditor attach editing props to the element they render + // through (ref, contentEditable, key/blur handlers) — Tag must forward them + // or the element never becomes editable in edit mode (React 19: ref is a prop). + ref?: React.Ref } -export function Tag({ children, accent = false, className = '' }: TagProps) { +export function Tag({ children, accent = false, className = '', ref, ...rest }: TagProps) { return ( - + {children} )