Files
docx-js/ts/docx/paragraph/indent.ts
2017-03-10 14:31:21 +01:00

25 lines
571 B
TypeScript

import { XmlAttributeComponent, XmlComponent } from "../xml-components";
interface IIndentAttributesProperties {
left?: number;
hanging?: number;
}
class IndentAttributes extends XmlAttributeComponent<IIndentAttributesProperties> {
protected xmlKeys = {
left: "w:left",
hanging: "w:hanging",
};
}
export class Indent extends XmlComponent {
constructor(left: number, hanging?: number) {
super("w:ind");
this.root.push(new IndentAttributes({
left: left,
hanging: hanging,
}));
}
}