created: 20210626162736737
description: Create a single item on a persistent checklist. State for the checklist in a given tiddler is stored in a data tiddler called $:/checkify/TiddlerName.
example: <div class="checklist"><<check-item One>><<check-item Two>><<check-item Three id:3>></div>
modified: 20210626164153871
tags: $:/tags/Macro
title: $:/sib/Macros/check-item
type: text/vnd.tiddlywiki

\whitespace trim

\define check-item(text, id:"")
<$set name="checkbox-index" value={{{ [<__id__>!is[blank]] ~[<__text__>] }}}>
<$set name="tiddler-key" value={{{ [all[current]!is[draft]] ~[all[current]get[draft.of]] }}}>
	<$checkbox tiddler={{{ [[$:/checkify/]addsuffix<tiddler-key>] }}} index=<<checkbox-index>> checked="yes" unchecked="no" default="no">
		<<__text__>>
	</$checkbox>
</$set>
</$set>
\end