Skip to content

Commit

Permalink
Feat: add color for block types
Browse files Browse the repository at this point in the history
  • Loading branch information
ericz15 authored and jomei committed Aug 8, 2022
1 parent fdf318a commit 2a903bc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions block.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ type Paragraph struct {
Text []RichText `json:"text,omitempty"`
RichText []RichText `json:"rich_text"`
Children Blocks `json:"children,omitempty"`
Color string `json:"color,omitempty"`
}

type Heading1Block struct {
Expand All @@ -257,6 +258,7 @@ type Heading1Block struct {
type Heading struct {
RichText []RichText `json:"rich_text"`
Children Blocks `json:"children,omitempty"`
Color string `json:"color,omitempty"`
}

type Heading2Block struct {
Expand All @@ -280,6 +282,7 @@ type Callout struct {
RichText []RichText `json:"rich_text"`
Icon *Icon `json:"icon,omitempty"`
Children Blocks `json:"children,omitempty"`
Color string `json:"color,omitempty"`
}

type QuoteBlock struct {
Expand All @@ -292,6 +295,7 @@ type Quote struct {
Text []RichText `json:"text,omitempty"`
RichText []RichText `json:"rich_text"`
Children Blocks `json:"children,omitempty"`
Color string `json:"color,omitempty"`
}

type TableBlock struct {
Expand Down Expand Up @@ -325,6 +329,7 @@ type ListItem struct {
Text []RichText `json:"text,omitempty"`
RichText []RichText `json:"rich_text"`
Children Blocks `json:"children,omitempty"`
Color string `json:"color,omitempty"`
}

type NumberedListItemBlock struct {
Expand All @@ -343,6 +348,7 @@ type ToDo struct {
RichText []RichText `json:"rich_text,omitempty"`
Children Blocks `json:"children,omitempty"`
Checked bool `json:"checked"`
Color string `json:"color,omitempty"`
}

type ToggleBlock struct {
Expand All @@ -359,6 +365,7 @@ type Toggle struct {
Text []RichText `json:"text,omitempty"`
RichText []RichText `json:"rich_text"`
Children Blocks `json:"children,omitempty"`
Color string `json:"color,omitempty"`
}

type ChildPageBlock struct {
Expand Down Expand Up @@ -476,6 +483,7 @@ type TableOfContentsBlock struct {

type TableOfContents struct {
// empty
Color string `json:"color,omitempty"`
}

type DividerBlock struct {
Expand Down

0 comments on commit 2a903bc

Please sign in to comment.