cluedin-widget
Version:
This is the project for creating and managing widgets in CluedIn.
15 lines (13 loc) • 493 B
JSX
import React from 'react';
import { removeWidget } from '../../action/core';
export default class RemovableComponent extends React.Component {
getRemovableActions() {
return [ {
type: 'Action', icon: 'fa fa-trash-o', title: 'Remove Widget', onClick: this.removeWidget.bind( this )
} ];
}
removeWidget() {
let { layoutInformation, widgetName } = this.props;
this.props.dispatch( removeWidget( widgetName, layoutInformation ) );
}
}