clean up imports into paragraph and paragraph style

(this prep for importing it from styles)
This commit is contained in:
felipe
2017-03-12 21:35:30 +01:00
parent 1cd681bc2d
commit b3524971ac
4 changed files with 32 additions and 19 deletions

View File

@ -0,0 +1,15 @@
import { XmlAttributeComponent, XmlComponent } from "../xml-components";
type alignmentOptions = "left" | "center" | "right" | "both";
class AlignmentAttributes extends XmlAttributeComponent<{val: alignmentOptions}> {
protected xmlKeys = {val: "w:val"};
}
export class Alignment extends XmlComponent {
constructor(type: alignmentOptions) {
super("w:jc");
this.root.push(new AlignmentAttributes({val: type}));
}
}