mirror of
https://github.com/flarum/core.git
synced 2025-10-10 22:44:25 +02:00
* Replace gulp with webpack and npm scripts for JS compilation * Set up Travis CI to commit compiled JS * Restructure `js` directory; only one instance of npm, forum/admin are "submodules" * Refactor JS initializers into Application subclasses * Maintain partial compatibility API (importing from absolute paths) for extensions * Remove minification responsibility from PHP asset compiler * Restructure `less` directory
39 lines
679 B
JavaScript
39 lines
679 B
JavaScript
/*
|
|
* 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 {
|
|
view() {
|
|
return (
|
|
<div className={"Widget "+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 [];
|
|
}
|
|
}
|