now extends XmlComponent
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user