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

27 lines
618 B
TypeScript
Raw Normal View History

2016-05-21 00:02:46 +01:00
import {XmlComponent, XmlAttributeComponent} from "../docx/xml-components";
interface IndentAttributesProperties {
2016-05-26 15:08:34 +01:00
left: number;
hanging: number;
2016-05-21 00:02:46 +01:00
}
class IndentAttributes extends XmlAttributeComponent {
2016-05-26 15:08:34 +01:00
2016-05-21 00:02:46 +01:00
constructor(properties: IndentAttributesProperties) {
super({
left: "w:left",
hanging: "w:hanging"
}, properties);
}
}
export class Indent extends XmlComponent {
2016-05-26 15:08:34 +01:00
2016-05-21 00:02:46 +01:00
constructor(left: number, hanging: number) {
super("w:ind");
this.root.push(new IndentAttributes({
left: left,
hanging: hanging
}));
}
}