Widget Cleanup

Removed unused Widget (which is duplicate of DashboardWidget), made DashboardWidget abstract
This commit is contained in:
Alexander Skvortsov 2020-04-29 17:40:53 -04:00 committed by David Sevilla Martín
parent d83d082c4a
commit 968ece2c61
3 changed files with 4 additions and 31 deletions

View File

@ -1,8 +1,8 @@
import Component from '../../common/Component';
export default class Widget extends Component {
export default abstract class DashboardWidget extends Component {
view() {
return <div className={'Widget ' + this.className()}>{this.content()}</div>;
return <div className={'DashboardWidget ' + this.className()}>{this.content()}</div>;
}
/**
@ -19,7 +19,5 @@ export default class Widget extends Component {
*
* @return {VirtualElement}
*/
content() {
return [];
}
abstract content(): JSX.Element
}

View File

@ -1,25 +0,0 @@
import Component from '../../common/Component';
export default class DashboardWidget extends Component {
view() {
return <div className={'DashboardWidget ' + this.className()}>{this.content()}</div>;
}
/**
* Get the class name to apply to the widget.
*
* @return {String}
*/
className() {
return '';
}
/**
* Get the content of the widget.
*
* @return {VirtualElement}
*/
content() {
return [];
}
}

View File

@ -11,7 +11,7 @@
}
}
.Widget {
.DashboardWidget {
background: @body-bg;
color: @text-color;
border-radius: @border-radius;