mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-05 16:37:19 -04:00
Rename CheckedItem to TaskItem
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user