Text
Text component display a text.
The text supports emoji shortcodes: :tada: renders as 🎉.
API
func Text(c *tgframe.Container, text string, conf ...*TextConf)
cis Parent container.textis the text.confis an optional configuration, at most one.
// TextConf is the configuration for the Text component.
type TextConf struct {
tgframe.Base // ID
}
Example
tgcomp.Text(p.Main, "Text")
tgcomp.Text(p.Main, "Text", &tgcomp.TextConf{ID: "greeting"})
Components are placed by position rather than by identity, so the same text written twice shows twice:
tgcomp.Text(p.Main, "written twice")
tgcomp.Text(p.Main, "written twice")
