Add convenience function for creating a B element with a text node

This commit is contained in:
Luis Eduardo Jeréz Girón
2024-08-03 21:05:01 -06:00
parent f0340e282a
commit d66e79bca5

View File

@@ -119,3 +119,9 @@ func PText(text string) gomponents.Node {
func SpanText(text string) gomponents.Node {
return html.Span(gomponents.Text(text))
}
// BText is a convenience function to create a B element with a
// simple text node as its child.
func BText(text string) gomponents.Node {
return html.B(gomponents.Text(text))
}