AddText adds the given supporting [Text], typically added after a title.
(text string)
| 92 | // AddText adds the given supporting [Text], typically added |
| 93 | // after a title. |
| 94 | func (bd *Body) AddText(text string) *Body { |
| 95 | NewText(bd).SetText(text). |
| 96 | SetType(TextBodyMedium).Styler(func(s *styles.Style) { |
| 97 | s.Color = colors.Scheme.OnSurfaceVariant |
| 98 | }) |
| 99 | return bd |
| 100 | } |
| 101 | |
| 102 | // SetData sets the [Body]'s [Scene.Data]. |
| 103 | func (bd *Body) SetData(data any) *Body { |