now extends XmlComponent

This commit is contained in:
Dolan Miu
2016-04-09 20:16:35 +01:00
parent 84610bd72f
commit f68a2aff56
33 changed files with 180 additions and 371 deletions

View File

@ -1,19 +1,14 @@
import {XmlComponent} from "../../docx/xml-components";
import {StyleAttributes} from "./attributes";
export class Style implements XmlComponent {
private style: Array<XmlComponent>;
xmlKeys = {
style: "w:style"
}
export class Style extends XmlComponent {
constructor(attributes: StyleAttributes) {
this.style = new Array<XmlComponent>();
this.style.push(attributes);
super("w:style");
this.root.push(attributes);
}
push(styleSegment: XmlComponent): void {
this.style.push(styleSegment);
this.root.push(styleSegment);
}
}