Using a better demo naming system
This commit is contained in:
@ -201,7 +201,7 @@ export class HighlightComplexScript extends XmlComponent {
|
||||
}
|
||||
}
|
||||
|
||||
export class Shadow extends XmlComponent {
|
||||
export class Shading extends XmlComponent {
|
||||
constructor(value: string, fill: string, color: string) {
|
||||
super("w:shd");
|
||||
this.root.push(
|
||||
|
@ -158,7 +158,7 @@ describe("Run", () => {
|
||||
describe("#shadow()", () => {
|
||||
it("it should add shadow to the properties", () => {
|
||||
const run = new Run({
|
||||
shadow: {
|
||||
shading: {
|
||||
type: ShadingType.PERCENT_10,
|
||||
fill: "00FFFF",
|
||||
color: "FF0000",
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
Italics,
|
||||
ItalicsComplexScript,
|
||||
RightToLeft,
|
||||
Shadow,
|
||||
Shading,
|
||||
ShadowComplexScript,
|
||||
Size,
|
||||
SizeComplexScript,
|
||||
@ -51,7 +51,7 @@ export interface IRunOptions {
|
||||
readonly hint?: string;
|
||||
};
|
||||
readonly highlight?: string;
|
||||
readonly shadow?: {
|
||||
readonly shading?: {
|
||||
readonly type: ShadingType;
|
||||
readonly fill: string;
|
||||
readonly color: string;
|
||||
@ -130,9 +130,9 @@ export class Run extends XmlComponent {
|
||||
this.properties.push(new HighlightComplexScript(options.highlight));
|
||||
}
|
||||
|
||||
if (options.shadow) {
|
||||
this.properties.push(new Shadow(options.shadow.type, options.shadow.fill, options.shadow.color));
|
||||
this.properties.push(new ShadowComplexScript(options.shadow.type, options.shadow.fill, options.shadow.color));
|
||||
if (options.shading) {
|
||||
this.properties.push(new Shading(options.shading.type, options.shading.fill, options.shading.color));
|
||||
this.properties.push(new ShadowComplexScript(options.shading.type, options.shading.fill, options.shading.color));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user