mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
14 lines
410 B
JavaScript
14 lines
410 B
JavaScript
import Container from "./container.js";
|
|
|
|
export default class FlexContainer extends Container {
|
|
constructor(direction) {
|
|
super();
|
|
|
|
if (!direction || !['row', 'column'].includes(direction)) {
|
|
throw new Error(`Direction argument given as "${direction}", use either 'row' or 'column'`);
|
|
}
|
|
|
|
this.attrs.style = `display: flex; flex-direction: ${direction};`;
|
|
}
|
|
}
|