Skip to content

Commit

Permalink
feat: add ContentEntitiesBuilder.heading
Browse files Browse the repository at this point in the history
  • Loading branch information
d1snin committed Oct 23, 2023
1 parent 27131fe commit 40fbb98
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,20 @@ public fun ContentEntitiesBuilder.text(value: String, heading: String? = null) {
}
}

public fun ContentEntitiesBuilder.heading(value: String, level: TextContentEntityTypeDefinition.Heading) {
text(value, heading = level.key)
}

public fun ContentEntitiesBuilder.firstHeading(value: String) {
text(value, heading = TextContentEntityTypeDefinition.Heading.H1.name)
heading(value, level = TextContentEntityTypeDefinition.Heading.H1)
}

public fun ContentEntitiesBuilder.secondHeading(value: String) {
text(value, heading = TextContentEntityTypeDefinition.Heading.H2.name)
heading(value, level = TextContentEntityTypeDefinition.Heading.H2)
}

public fun ContentEntitiesBuilder.thirdHeading(value: String) {
text(value, heading = TextContentEntityTypeDefinition.Heading.H3.name)
heading(value, level = TextContentEntityTypeDefinition.Heading.H3)
}

public fun ContentEntitiesBuilder.buttonLink(
Expand Down

0 comments on commit 40fbb98

Please sign in to comment.