Remove internal package import from todo example
All checks were successful
CI / build (push) Successful in 27s

Replace direct internal/element usage with public ui package
components to ensure examples only use the public API:

- Add ui.RawCheckbox for plain checkbox without label wrapper
- Add ui.Span for span elements with text content
- Add View.TextDecoration modifier for strikethrough styling
- Update todo example to use these public components

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit was merged in pull request #16.
This commit is contained in:
2026-01-09 17:23:47 +01:00
parent 505fa0f84a
commit 9642fd008e
4 changed files with 38 additions and 17 deletions

View File

@@ -21,3 +21,10 @@ func TextFromFunction(fn func() string) View {
return View{textNode}
}
// Span creates a span element with the given text content.
func Span(text string) View {
v := View{element.NewElement("span")}
v.e.Set("textContent", text)
return v
}