further clean up border code; update paragraph borders to use shared type; BREAKING: paragraph border value attr renamed to style, to match other usages of borders
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
// Creates two paragraphs, one with a border and one without
|
||||
// Import from 'docx' rather than '../build' if you install from npm
|
||||
import * as fs from "fs";
|
||||
import { Document, Packer, Paragraph } from "../build";
|
||||
import { BorderStyle, Document, Packer, Paragraph } from "../build";
|
||||
|
||||
const doc = new Document({
|
||||
sections: [
|
||||
@ -14,13 +14,13 @@ const doc = new Document({
|
||||
top: {
|
||||
color: "auto",
|
||||
space: 1,
|
||||
value: "single",
|
||||
style: BorderStyle.SINGLE,
|
||||
size: 6,
|
||||
},
|
||||
bottom: {
|
||||
color: "auto",
|
||||
space: 1,
|
||||
value: "single",
|
||||
style: BorderStyle.SINGLE,
|
||||
size: 6,
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user