mirror of
https://github.com/flarum/framework.git
synced 2024-11-22 14:41:39 +08:00
Widget Cleanup
Removed unused Widget (which is duplicate of DashboardWidget), made DashboardWidget abstract
This commit is contained in:
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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user