Implement clickable badges (#8401)

Adds an `onClick` handler to LGraphBadge

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8401-Implement-clickable-badges-2f76d73d365081b3b23fc1eaa3bc65b8)
by [Unito](https://www.unito.io)
This commit is contained in:
AustinMroz
2026-01-29 00:04:28 -08:00
committed by GitHub
parent 3866fe7eaa
commit 44baadd7ca
6 changed files with 34 additions and 3 deletions

View File

@@ -6,6 +6,7 @@
color: fgColor,
backgroundColor: bgColor
}"
@click="(e) => onClick?.(e)"
>
{{ text }}
<i v-if="cssIcon" :class="cn(cssIcon)" />
@@ -20,6 +21,7 @@ export interface NodeBadgeProps {
fgColor?: LGraphBadge['fgColor']
bgColor?: LGraphBadge['bgColor']
cssIcon?: string
onClick?: (e: MouseEvent) => void
}
const {