remove more duplicate classes; add additional values functions; clean up tests

This commit is contained in:
Tom Hunkapiller
2021-05-24 11:28:10 +03:00
parent a56119e7cd
commit ce2a0fb864
38 changed files with 311 additions and 362 deletions

View File

@ -33,7 +33,7 @@ export class BorderElement extends XmlComponent {
constructor(elementName: string, { color, ...options }: IBorderOptions) {
super(elementName);
this.root.push(
new TableBordersAttributes({
new BordersAttributes({
...options,
color: color === undefined ? color : hexColorValue(color),
}),
@ -41,7 +41,7 @@ export class BorderElement extends XmlComponent {
}
}
class TableBordersAttributes extends XmlAttributeComponent<IBorderOptions> {
class BordersAttributes extends XmlAttributeComponent<IBorderOptions> {
protected readonly xmlKeys = {
style: "w:val",
color: "w:color",