Consolidate TableWidth and TableCellMargins types; add Table indent (#954)

This commit is contained in:
Tom Hunkapiller
2021-05-23 21:17:20 +03:00
parent 528be93191
commit dd6d1bc039
18 changed files with 215 additions and 552 deletions

View File

@ -53,6 +53,18 @@ const table = new Table({
});
```
### Set Indent
```ts
const table = new Table({
...,
indent: {
size: 600,
type: WidthType.DXA,
}
});
```
## Table Row
A table consists of multiple `table rows`. Table rows have a list of `children` which accepts a list of `table cells` explained below. You can create a simple `table row` like so:
@ -190,12 +202,12 @@ Google DOCS does not support start and end borders, instead they use left and ri
const cell = new TableCell({
...,
borders: {
top: {
left: {
style: BorderStyle.DOT_DOT_DASH,
size: 3,
color: "green",
},
bottom: {
right: {
style: BorderStyle.DOT_DOT_DASH,
size: 3,
color: "ff8000",