add markdown render

This commit is contained in:
kkzzhizhou 2021-11-20 17:11:13 +08:00
parent 9b15bb1236
commit e45182547f
14 changed files with 53 additions and 28 deletions

View file

@ -1,11 +1,16 @@
import Emoji from "react-emoji-render";
import * as React from "react";
import ReactMarkdown from "react-markdown";
function DailyItem(props: any) {
return (
<div className="todo-item" id={props.id}>
<input type="checkbox" className="checkbox" id={props.id} onChange={props.onChange} checked={props.completed}/>
<p><Emoji text={props.daily_text}></Emoji></p>
<input type="checkbox" className="checkbox" id={props.id} onChange={props.onChange} checked={props.completed} />
<div>
<p><Emoji text={props.daily_text}></Emoji></p>
<ReactMarkdown children={props.daily_notes} />
</div>
</div>
)
}