update CheckBox and tests to handle optional alias field

This commit is contained in:
Juan D
2023-06-23 13:06:18 -04:00
parent 9e9ca526fe
commit fa400bcf39
2 changed files with 7 additions and 21 deletions

View File

@ -9,10 +9,10 @@ export class CheckBox extends XmlComponent {
private readonly DEFAULT_UNCHECKED_SYMBOL: string = "2610";
private readonly DEFAULT_CHECKED_SYMBOL: string = "2612";
private readonly DEFAULT_FONT: string = "MS Gothic";
public constructor(options?: ICheckboxSymbolOptions) {
public constructor(alias?: string, options?: ICheckboxSymbolOptions) {
super("w:sdt");
const properties = new StructuredDocumentTagProperties("Checkbox");
const properties = new StructuredDocumentTagProperties(alias);
properties.addChildElement(new CheckBoxUtil(options));
this.root.push(properties);