feat: more fonts, more styling

This commit is contained in:
Daniel Ledda
2021-09-05 16:06:48 +02:00
parent e82a0878cd
commit f3f966c9ca
17 changed files with 101 additions and 37 deletions

View File

@@ -2,6 +2,7 @@ import UINode, {UINodeOptions} from "../UINode";
import BeatGroupView from "../BeatGroup/BeatGroupView";
import BeatGroup from "../../BeatGroup";
import "./Root.css";
import BeatGroupSettingsView from "../BeatGroupSettings/BeatGroupSettingsView";
export type RootUINodeOptions = UINodeOptions & {
title: string,
@@ -12,20 +13,39 @@ export default class RootView extends UINode {
private title: string;
private beatGroupView: BeatGroupView;
private mainBeatGroup: BeatGroup;
private beatGroupSettingsView!: BeatGroupSettingsView;
constructor(options: RootUINodeOptions) {
super(options);
this.beatGroupView = new BeatGroupView({title: "THE BEAT", beatGroup: options.mainBeatGroup});
this.mainBeatGroup = options.mainBeatGroup;
this.beatGroupView = new BeatGroupView({title: "THE BEAT", beatGroup: this.mainBeatGroup});
this.title = options.title;
}
rebuild(): HTMLDivElement {
this.beatGroupSettingsView = new BeatGroupSettingsView({beatGroup: this.mainBeatGroup});
return UINode.make("div", {
classes: ["root"],
subs: [
UINode.make("h1", {innerText: this.title, classes: ["root-title"]}),
this.beatGroupView.render(),
UINode.make("div", {
classes: ["root-settings"],
subs: [
UINode.make("h1", {innerText: this.title, classes: ["root-title"]}),
this.beatGroupSettingsView.render(),
]
}),
UINode.make("div", {
classes: ["root-beat-stage-container"],
subs: [
UINode.make("div", {
classes: ["root-beat-stage"],
subs: [
this.beatGroupView.render(),
],
})
]
})
],
});
}