Skip to content

Commit 2a903bc

Browse files
ericz15jomei
authored andcommitted
Feat: add color for block types
1 parent fdf318a commit 2a903bc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

block.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ type Paragraph struct {
247247
Text []RichText `json:"text,omitempty"`
248248
RichText []RichText `json:"rich_text"`
249249
Children Blocks `json:"children,omitempty"`
250+
Color string `json:"color,omitempty"`
250251
}
251252

252253
type Heading1Block struct {
@@ -257,6 +258,7 @@ type Heading1Block struct {
257258
type Heading struct {
258259
RichText []RichText `json:"rich_text"`
259260
Children Blocks `json:"children,omitempty"`
261+
Color string `json:"color,omitempty"`
260262
}
261263

262264
type Heading2Block struct {
@@ -280,6 +282,7 @@ type Callout struct {
280282
RichText []RichText `json:"rich_text"`
281283
Icon *Icon `json:"icon,omitempty"`
282284
Children Blocks `json:"children,omitempty"`
285+
Color string `json:"color,omitempty"`
283286
}
284287

285288
type QuoteBlock struct {
@@ -292,6 +295,7 @@ type Quote struct {
292295
Text []RichText `json:"text,omitempty"`
293296
RichText []RichText `json:"rich_text"`
294297
Children Blocks `json:"children,omitempty"`
298+
Color string `json:"color,omitempty"`
295299
}
296300

297301
type TableBlock struct {
@@ -325,6 +329,7 @@ type ListItem struct {
325329
Text []RichText `json:"text,omitempty"`
326330
RichText []RichText `json:"rich_text"`
327331
Children Blocks `json:"children,omitempty"`
332+
Color string `json:"color,omitempty"`
328333
}
329334

330335
type NumberedListItemBlock struct {
@@ -343,6 +348,7 @@ type ToDo struct {
343348
RichText []RichText `json:"rich_text,omitempty"`
344349
Children Blocks `json:"children,omitempty"`
345350
Checked bool `json:"checked"`
351+
Color string `json:"color,omitempty"`
346352
}
347353

348354
type ToggleBlock struct {
@@ -359,6 +365,7 @@ type Toggle struct {
359365
Text []RichText `json:"text,omitempty"`
360366
RichText []RichText `json:"rich_text"`
361367
Children Blocks `json:"children,omitempty"`
368+
Color string `json:"color,omitempty"`
362369
}
363370

364371
type ChildPageBlock struct {
@@ -476,6 +483,7 @@ type TableOfContentsBlock struct {
476483

477484
type TableOfContents struct {
478485
// empty
486+
Color string `json:"color,omitempty"`
479487
}
480488

481489
type DividerBlock struct {

0 commit comments

Comments
 (0)