mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-27 02:04:09 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user