Skip to content

Commit

Permalink
Add icon property to widget object
Browse files Browse the repository at this point in the history
  • Loading branch information
tortuvshin committed Feb 1, 2024
1 parent fb43ad0 commit ad7613c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion addon/services/universe.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,18 +667,20 @@ export default class UniverseService extends Service.extend(Evented) {
* @memberof UniverseService
* @param {Object} widget - The widget object containing name, component, gridOptions, and options.
* @property {String} name - The name of the widget.
* @property {String} icon - The iron of the widget.
* @property {Function} component - The component associated with the widget.
* @property {Object} gridOptions - The grid options for the widget.
* @property {Object} options - Additional options for the widget.
*/
@action
registerWidget(widget) {
// Extract properties from the widget object
const { name, component, grid_options, options } = widget;
const { name, icon, component, grid_options, options } = widget;

// Create a new widget object with the extracted properties
const newWidget = {
name,
icon,
component,
grid_options,
options,
Expand Down

0 comments on commit ad7613c

Please sign in to comment.