mirror of
https://github.com/flarum/framework.git
synced 2024-11-22 14:41:39 +08:00
chore: convert HeaderPrimary to TypeScript (#4052)
This commit is contained in:
parent
da441c77ca
commit
4291918171
|
@ -1,13 +1,14 @@
|
||||||
import Component from '../../common/Component';
|
import Component from '../../common/Component';
|
||||||
import ItemList from '../../common/utils/ItemList';
|
import ItemList from '../../common/utils/ItemList';
|
||||||
import listItems from '../../common/helpers/listItems';
|
import listItems from '../../common/helpers/listItems';
|
||||||
|
import type Mithril from 'mithril';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The `HeaderPrimary` component displays primary header controls. On the
|
* The `HeaderPrimary` component displays primary header controls. On the
|
||||||
* default skin, these are shown just to the right of the forum title.
|
* default skin, these are shown just to the right of the forum title.
|
||||||
*/
|
*/
|
||||||
export default class HeaderPrimary extends Component {
|
export default class HeaderPrimary extends Component {
|
||||||
view() {
|
view(): JSX.Element {
|
||||||
return <ul className="Header-controls">{listItems(this.items().toArray())}</ul>;
|
return <ul className="Header-controls">{listItems(this.items().toArray())}</ul>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +17,8 @@ export default class HeaderPrimary extends Component {
|
||||||
*
|
*
|
||||||
* @return {ItemList<import('mithril').Children>}
|
* @return {ItemList<import('mithril').Children>}
|
||||||
*/
|
*/
|
||||||
items() {
|
|
||||||
return new ItemList();
|
items(): ItemList<Mithril.Children> {
|
||||||
|
return new ItemList<Mithril.Children>();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user