Make .addSection fully declarative
This commit is contained in:
@ -6,21 +6,23 @@
|
||||
To make a bullet point, simply make a paragraph into a bullet point:
|
||||
|
||||
```ts
|
||||
doc.addSection({
|
||||
children: [
|
||||
new Paragraph({
|
||||
text: "Bullet points",
|
||||
bullet: {
|
||||
level: 0 //How deep you want the bullet to be
|
||||
}
|
||||
}),
|
||||
new Paragraph({
|
||||
text: "Are awesome",
|
||||
bullet: {
|
||||
level: 0
|
||||
}
|
||||
})
|
||||
],
|
||||
const doc = new Document({
|
||||
sections: [{
|
||||
children: [
|
||||
new Paragraph({
|
||||
text: "Bullet points",
|
||||
bullet: {
|
||||
level: 0 //How deep you want the bullet to be
|
||||
}
|
||||
}),
|
||||
new Paragraph({
|
||||
text: "Are awesome",
|
||||
bullet: {
|
||||
level: 0
|
||||
}
|
||||
})
|
||||
],
|
||||
}];
|
||||
});
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user