<aside> 💡 This page is documentation for repository below. https://github.com/sota1235/notion-sdk-js-helper
</aside>
await client.pages.create({
// ...
children: [
paragraph('paragraph'),
paragraph('colored paragraph', {
blockColor: 'blue',
}),
paragraph('annotated paragraph', {
textAnnotation: {
bold: true,
},
}),
paragraph('parent paragraph', {
children: [
paragraph('child paragraph'),
],
}),
],
});
paragraph
colored paragraph
annotated paragraph
parent paragraph
child paragraph
await client.pages.create({
// ...
children: [
heading1('Heading1'),
heading2('Heading2'),
heading3('Heading3'),
heading1('Toggleable heading1', {
isToggleable: true,
children: [
heading2('Decorated header', {
blockColor: 'red_background',
textAnnotation: {
italic: true,
},
}),
],
}),
],
});
await client.pages.create({
// ...
children: [
callout('Callout', '🥴'),
callout('Change color as you like', '🎨', {
blockColor: 'red_background',
}),
],
});
<aside> 🥴 Callout
</aside>
<aside> 🎨 Change color as you like
</aside>
await client.pages.create({
// ...
children: [
quote('Some great articles.'),
quote('Some great articles with greate background color.', {
blockColor: 'yellow_background',
}),
],
});
Some great articles.
Some great articles with greate background color.
await client.pages.create({
// ...
children: [
bulletedListItem('Bulleted list item 1'),
bulletedListItem('Bulleted list item 2', {
children: [
bulletedListItem('Child bulleted list item'),
],
}),
numberedListItem('Numbered list item 1'),
numberedListItem('Numbered list item 2', {
children: [
numberedListItem('Child numbered list item'),
],
}),
],
});
await client.pages.create({
// ...
children: [
todo('TODO 1'),
todo('TODO 2', {
checked: true,
children: [
todo('Child TODO'),
],
}),
],
});
await client.pages.create({
// ...
children: [
toggle('Toggle block', {
children: [
paragraph('Child paragraph'),
],
}),
],
});