Skip to content

Commit 6cfcbcf

Browse files
Fix heading blocks to support toggles
1 parent 1b3a00c commit 6cfcbcf

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Src/Notion.Client/Models/Blocks/HeadingOneBlock.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ public class HeadingOneBlock : Block, IColumnChildrenBlock, INonColumnBlock
1313

1414
public override BlockType Type => BlockType.Heading_1;
1515

16-
public override bool HasChildren => false;
17-
1816
public class Info
1917
{
2018
[JsonProperty("rich_text")]
@@ -23,6 +21,9 @@ public class Info
2321
[JsonProperty("color")]
2422
[JsonConverter(typeof(StringEnumConverter))]
2523
public Color? Color { get; set; }
24+
25+
[JsonProperty("is_toggleable")]
26+
public bool IsToggleable { get; set; }
2627
}
2728
}
2829
}

Src/Notion.Client/Models/Blocks/HeadingThreeeBlock.cs renamed to Src/Notion.Client/Models/Blocks/HeadingThreeBlock.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ public class HeadingThreeBlock : Block, IColumnChildrenBlock, INonColumnBlock
1313

1414
public override BlockType Type => BlockType.Heading_3;
1515

16-
public override bool HasChildren => false;
17-
1816
public class Info
1917
{
2018
[JsonProperty("rich_text")]
@@ -23,6 +21,9 @@ public class Info
2321
[JsonProperty("color")]
2422
[JsonConverter(typeof(StringEnumConverter))]
2523
public Color? Color { get; set; }
24+
25+
[JsonProperty("is_toggleable")]
26+
public bool IsToggleable { get; set; }
2627
}
2728
}
2829
}

Src/Notion.Client/Models/Blocks/HeadingTwoBlock.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ public class HeadingTwoBlock : Block, IColumnChildrenBlock, INonColumnBlock
1313

1414
public override BlockType Type => BlockType.Heading_2;
1515

16-
public override bool HasChildren => false;
17-
1816
public class Info
1917
{
2018
[JsonProperty("rich_text")]
@@ -23,6 +21,9 @@ public class Info
2321
[JsonProperty("color")]
2422
[JsonConverter(typeof(StringEnumConverter))]
2523
public Color? Color { get; set; }
24+
25+
[JsonProperty("is_toggleable")]
26+
public bool IsToggleable { get; set; }
2627
}
2728
}
2829
}

0 commit comments

Comments
 (0)