fix(editor): Update design system menu item component (#6659)
This commit is contained in:
@@ -31,6 +31,33 @@ defaultMenuItem.args = {
|
||||
},
|
||||
};
|
||||
|
||||
export const withSecondaryIcon = template.bind({});
|
||||
withSecondaryIcon.args = {
|
||||
item: {
|
||||
id: 'workflows',
|
||||
icon: 'heart',
|
||||
label: 'Workflows',
|
||||
secondaryIcon: { name: 'lock', size: 'small' },
|
||||
},
|
||||
};
|
||||
|
||||
export const withSecondaryIconTooltip = template.bind({});
|
||||
withSecondaryIconTooltip.args = {
|
||||
item: {
|
||||
id: 'workflows',
|
||||
icon: 'heart',
|
||||
label: 'Workflows',
|
||||
secondaryIcon: {
|
||||
name: 'lock',
|
||||
size: 'small',
|
||||
tooltip: {
|
||||
content: 'Locked secret',
|
||||
bindTo: 'secondaryIcon',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const compact = template.bind({});
|
||||
compact.args = {
|
||||
item: {
|
||||
|
||||
@@ -62,9 +62,9 @@
|
||||
<n8n-tooltip
|
||||
v-if="item.secondaryIcon"
|
||||
:class="$style.secondaryIcon"
|
||||
:placement="item.tooltip?.placement || 'right'"
|
||||
:content="item.tooltip?.content"
|
||||
:disabled="compact || !item.tooltip?.content || item.tooltip?.bindTo !== 'secondaryIcon'"
|
||||
:placement="item.secondaryIcon?.tooltip?.placement || 'right'"
|
||||
:content="item.secondaryIcon?.tooltip?.content"
|
||||
:disabled="compact || !item.secondaryIcon?.tooltip?.content"
|
||||
:open-delay="tooltipDelay"
|
||||
>
|
||||
<n8n-icon :icon="item.secondaryIcon.name" :size="item.secondaryIcon.size || 'small'" />
|
||||
|
||||
Reference in New Issue
Block a user