Re-name paragraph styles

This commit is contained in:
Dolan
2020-11-06 00:27:57 +00:00
parent 610b2388bb
commit 74db67689f
6 changed files with 83 additions and 83 deletions

View File

@ -1,6 +1,6 @@
import { BaseXmlComponent, ImportedXmlComponent, XmlComponent } from "file/xml-components";
import { CharacterStyle, ParagraphStyle } from "./style";
import { StyleForCharacter, StyleForParagraph } from "./style";
import { ICharacterStyleOptions } from "./style/character-style";
import { IParagraphStyleOptions } from "./style/paragraph-style";
export * from "./border";
@ -9,7 +9,7 @@ export interface IStylesOptions {
readonly initialStyles?: BaseXmlComponent;
readonly paragraphStyles?: IParagraphStyleOptions[];
readonly characterStyles?: ICharacterStyleOptions[];
readonly importedStyles?: (XmlComponent | ParagraphStyle | CharacterStyle | ImportedXmlComponent)[];
readonly importedStyles?: (XmlComponent | StyleForParagraph | StyleForCharacter | ImportedXmlComponent)[];
}
export class Styles extends XmlComponent {
@ -28,13 +28,13 @@ export class Styles extends XmlComponent {
if (options.paragraphStyles) {
for (const style of options.paragraphStyles) {
this.root.push(new ParagraphStyle(style));
this.root.push(new StyleForParagraph(style));
}
}
if (options.characterStyles) {
for (const style of options.characterStyles) {
this.root.push(new CharacterStyle(style));
this.root.push(new StyleForCharacter(style));
}
}
}