1
0
mirror of https://github.com/flarum/core.git synced 2025-01-17 22:29:15 +01:00

Removed excess Widget class in favor of DashboardWidget (#2164)

This commit is contained in:
Alexander Skvortsov 2020-05-19 20:52:07 -04:00 committed by GitHub
parent 1bb5f99a27
commit acf4e9c80d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 48 deletions

View File

@ -15,7 +15,6 @@ import AddExtensionModal from './components/AddExtensionModal';
import ExtensionsPage from './components/ExtensionsPage';
import AdminLinkButton from './components/AdminLinkButton';
import PermissionGrid from './components/PermissionGrid';
import Widget from './components/Widget';
import MailPage from './components/MailPage';
import UploadImageButton from './components/UploadImageButton';
import LoadingModal from './components/LoadingModal';
@ -46,7 +45,6 @@ export default Object.assign(compat, {
'components/ExtensionsPage': ExtensionsPage,
'components/AdminLinkButton': AdminLinkButton,
'components/PermissionGrid': PermissionGrid,
'components/Widget': Widget,
'components/MailPage': MailPage,
'components/UploadImageButton': UploadImageButton,
'components/LoadingModal': LoadingModal,

View File

@ -1,17 +1,8 @@
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import Component from '../../common/Component';
export default class Widget extends Component {
export default class DashboardWidget extends Component {
view() {
return <div className={'Widget ' + this.className()}>{this.content()}</div>;
return <div className={'DashboardWidget Widget ' + this.className()}>{this.content()}</div>;
}
/**

View File

@ -1,34 +0,0 @@
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
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;