docx-rs/docx-wasm/js/footer.ts

24 lines
448 B
TypeScript
Raw Normal View History

import { Paragraph } from "./paragraph";
2021-12-01 17:39:50 +02:00
import { Table } from "./table";
export class Footer {
hasNumberings = false;
2021-12-01 17:39:50 +02:00
children: (Paragraph | Table)[] = [];
addParagraph(p: Paragraph) {
if (p.hasNumberings) {
this.hasNumberings = true;
}
this.children.push(p);
return this;
}
2021-12-01 17:39:50 +02:00
addTable(t: Table) {
if (t.hasNumberings) {
this.hasNumberings = true;
}
this.children.push(t);
return this;
}
}