mirror of
https://github.com/flarum/core.git
synced 2025-08-03 15:07:53 +02:00
Widget Cleanup
Removed unused Widget (which is duplicate of DashboardWidget), made DashboardWidget abstract
This commit is contained in:
committed by
David Sevilla Martín
parent
d83d082c4a
commit
968ece2c61
@@ -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
|
||||
}
|
||||
|
@@ -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 [];
|
||||
}
|
||||
}
|
@@ -11,7 +11,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.Widget {
|
||||
.DashboardWidget {
|
||||
background: @body-bg;
|
||||
color: @text-color;
|
||||
border-radius: @border-radius;
|
||||
|
Reference in New Issue
Block a user