Improve API for check boxes

This commit is contained in:
Dolan Miu
2023-06-25 03:09:29 +01:00
parent db85c3dd2f
commit 210d9c58f2
5 changed files with 54 additions and 6 deletions

View File

@ -4,7 +4,8 @@ import { StringValueElement, XmlComponent } from "@file/xml-components";
export class StructuredDocumentTagProperties extends XmlComponent {
public constructor(alias?: string) {
super("w:sdtPr");
if (typeof alias === "string") {
if (alias) {
this.root.push(new StringValueElement("w:alias", alias));
}
}