Declarative styles
This commit is contained in:
@ -4,3 +4,4 @@ export * from "./symbol-run";
|
||||
export * from "./picture-run";
|
||||
export * from "./run-fonts";
|
||||
export * from "./sequential-identifier";
|
||||
export * from "./underline";
|
||||
|
@ -27,7 +27,7 @@ describe("Underline", () => {
|
||||
});
|
||||
|
||||
it("should use the given style type and color", () => {
|
||||
const underline = new u.Underline("double", "FF00CC");
|
||||
const underline = new u.Underline(u.UnderlineType.DOUBLE, "FF00CC");
|
||||
const tree = new Formatter().format(underline);
|
||||
expect(tree).to.deep.equal({
|
||||
"w:u": { _attr: { "w:val": "double", "w:color": "FF00CC" } },
|
||||
|
@ -33,7 +33,7 @@ export abstract class BaseUnderline extends XmlComponent {
|
||||
}
|
||||
|
||||
export class Underline extends BaseUnderline {
|
||||
constructor(underlineType: string = "single", color?: string) {
|
||||
constructor(underlineType: UnderlineType = UnderlineType.SINGLE, color?: string) {
|
||||
super(underlineType, color);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user