mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
feat: enhance WidgetButton component with icon support
Updated button widget to support icon display and improved styling to match design system. - Add icon rendering using widget.options.iconClass - Update styling to use semantic tokens - Use widget.label for display instead of widget.name - Apply consistent button styling with design system tokens
This commit is contained in:
@@ -1,14 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex flex-col gap-1">
|
<div class="flex flex-col gap-1">
|
||||||
<label v-if="widget.name" class="text-secondary text-sm">{{
|
|
||||||
widget.name
|
|
||||||
}}</label>
|
|
||||||
<Button
|
<Button
|
||||||
|
class="text-text-secondary w-full border-0 bg-component-node-widget-background p-2"
|
||||||
v-bind="filteredProps"
|
v-bind="filteredProps"
|
||||||
:aria-label="widget.name || widget.label"
|
:aria-label="widget.label"
|
||||||
size="small"
|
size="small"
|
||||||
|
:text="true"
|
||||||
@click="handleClick"
|
@click="handleClick"
|
||||||
/>
|
>
|
||||||
|
{{ widget.label }}
|
||||||
|
<i v-if="widget.options?.iconClass" :class="widget.options.iconClass"></i>
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user