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

19 lines
No EOL
451 B
JavaScript

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