trilium/src/public/javascripts/widgets/row_flex_container.js

19 lines
451 B
JavaScript
Raw Normal View History

2020-01-16 03:10:54 +08:00
import BasicWidget from "./basic_widget.js";
2020-01-16 04:36:01 +08:00
export default class RowFlexContainer extends BasicWidget {
2020-01-16 03:10:54 +08:00
constructor(appContext, widgets) {
super(appContext);
this.children = widgets;
2020-01-16 03:10:54 +08:00
}
render() {
this.$widget = $(`<div style="display: flex; flex-direction: row;">`);
for (const widget of this.children) {
2020-01-16 03:10:54 +08:00
this.$widget.append(widget.render());
}
return this.$widget;
}
}