Files
docx-js/ts/docx/paragraph/indent.ts

25 lines
571 B
TypeScript
Raw Normal View History

import { XmlAttributeComponent, XmlComponent } from "../xml-components";
2016-05-21 00:02:46 +01:00
interface IIndentAttributesProperties {
2017-03-10 14:30:07 +01:00
left?: number;
hanging?: number;
2016-05-21 00:02:46 +01:00
}
class IndentAttributes extends XmlAttributeComponent<IIndentAttributesProperties> {
protected xmlKeys = {
left: "w:left",
hanging: "w:hanging",
};
2016-05-21 00:02:46 +01:00
}
export class Indent extends XmlComponent {
2016-05-26 15:08:34 +01:00
constructor(left: number, hanging?: number) {
2016-05-21 00:02:46 +01:00
super("w:ind");
this.root.push(new IndentAttributes({
left: left,
hanging: hanging,
2016-05-21 00:02:46 +01:00
}));
}
}