Ga naar hoofdinhoud

CnWidgetEditCog

The single per-widget edit affordance for editable dashboards — a white, rounded cog button that opens a small action menu with Edit + Delete. Designed to be overlaid (absolute, top-right) by the host over any widget surface so every dashboard widget shares one consistent edit control. Emits raw edit / remove; the host decides what they act on. Labels are props so the consumer supplies translated strings.

<CnWidgetEditCog
:edit-label="t('myapp', 'Edit widget')"
:delete-label="t('myapp', 'Delete widget')"
@edit="onEdit(placement)"
@remove="onRemove(placement.id)" />

Props

NameTypeDefaultDescription
menuLabelString'Widget menu'Accessible name for the cog trigger / menu.
editLabelString'Edit widget'Label for the Edit action item.
deleteLabelString'Delete widget'Label for the Delete action item.

Events

NameDescription
editEmitted when the Edit action is clicked.
removeEmitted when the Delete action is clicked.