Rename CheckedItem to TaskItem

This commit is contained in:
Christian Muehlhaeuser
2019-12-13 22:42:16 +01:00
parent 3c0a9e2991
commit 6045dadccf
2 changed files with 3 additions and 3 deletions
+25
View File
@@ -0,0 +1,25 @@
package gold
import (
"io"
)
type TaskElement struct {
Checked bool
}
func (e *TaskElement) Render(w io.Writer, ctx RenderContext) error {
var el *BaseElement
pre := ctx.styles.Task.Unticked
if e.Checked {
pre = ctx.styles.Task.Ticked
}
el = &BaseElement{
Prefix: pre,
Style: ctx.styles.Task.StylePrimitive,
}
return el.Render(w, ctx)
}