2018-10-23 23:44:50 +01:00
|
|
|
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
|
|
|
|
|
|
|
export enum TableLayoutType {
|
|
|
|
AUTOFIT = "autofit",
|
|
|
|
FIXED = "fixed",
|
|
|
|
}
|
|
|
|
|
2018-11-02 02:51:57 +00:00
|
|
|
class TableLayoutAttributes extends XmlAttributeComponent<{ readonly type: TableLayoutType }> {
|
|
|
|
protected readonly xmlKeys = { type: "w:type" };
|
2018-10-23 23:44:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export class TableLayout extends XmlComponent {
|
|
|
|
constructor(type: TableLayoutType) {
|
|
|
|
super("w:tblLayout");
|
|
|
|
this.root.push(new TableLayoutAttributes({ type }));
|
|
|
|
}
|
|
|
|
}
|