From d66e79bca50bffe5347ebedba498143919425070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Eduardo=20Jer=C3=A9z=20Gir=C3=B3n?= Date: Sat, 3 Aug 2024 21:05:01 -0600 Subject: [PATCH] Add convenience function for creating a B element with a text node --- internal/view/web/component/typography.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/view/web/component/typography.go b/internal/view/web/component/typography.go index e8a8e0b..c0d7530 100644 --- a/internal/view/web/component/typography.go +++ b/internal/view/web/component/typography.go @@ -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)) +}