added style components

This commit is contained in:
Dolan Miu
2016-05-03 04:31:08 +01:00
parent c345ab716b
commit b86d292c64
2 changed files with 62 additions and 32 deletions

View File

@ -1,29 +1,30 @@
import {XmlComponent} from "../../docx/xml-components";
import {XmlAttributeComponent} from "../../docx/xml-components";
interface StyleAttributesProperties {
type?: string;
styleId?: string;
default?: string;
customStyle?: string;
val?: string;
}
export class StyleAttributes extends XmlComponent {
export class StyleAttributes extends XmlAttributeComponent {
private _attr: Object;
xmlKeys = {
type: "w:type",
styleId: "w:styleId",
default: "w:default",
customStyle: "w:customStyle"
};
constructor(properties?: StyleAttributesProperties) {
super("_attr");
this._attr = properties
super({
type: "w:type",
styleId: "w:styleId",
default: "w:default",
customStyle: "w:customStyle",
val: "w:val"
});
this.root = properties;
if (!properties) {
this._attr = {};
this.root = {};
}
this._attr["xmlKeys"] = this.xmlKeys;
}
}