Tidied up table components
This commit is contained in:
17
src/file/table/table-properties/table-layout.ts
Normal file
17
src/file/table/table-properties/table-layout.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
|
||||
export enum TableLayoutType {
|
||||
AUTOFIT = "autofit",
|
||||
FIXED = "fixed",
|
||||
}
|
||||
|
||||
class TableLayoutAttributes extends XmlAttributeComponent<{ type: TableLayoutType }> {
|
||||
protected xmlKeys = { type: "w:type" };
|
||||
}
|
||||
|
||||
export class TableLayout extends XmlComponent {
|
||||
constructor(type: TableLayoutType) {
|
||||
super("w:tblLayout");
|
||||
this.root.push(new TableLayoutAttributes({ type }));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user