2021-11-16 18:53:03 +05:30
|
|
|
import Emoji from "react-emoji-render";
|
|
|
|
|
import * as React from "react";
|
2021-11-20 17:11:13 +08:00
|
|
|
import ReactMarkdown from "react-markdown";
|
2021-10-19 10:54:06 +05:30
|
|
|
|
|
|
|
|
function HabitItem(props: any) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="habit-item" id={props.id}>
|
2022-01-13 12:47:36 -08:00
|
|
|
<div className="habit-button-grp">
|
|
|
|
|
<button className="habit-button" id={"plus" + props.id} onClick={props.onChange}>
|
|
|
|
|
+{props.upCount}
|
|
|
|
|
</button>
|
|
|
|
|
<button className="habit-button" id={"mins" + props.id} onClick={props.onChange}>
|
|
|
|
|
-{props.downCount}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2021-11-20 17:11:13 +08:00
|
|
|
<div>
|
|
|
|
|
<p className="habit-text"><Emoji text={props.habit_text}></Emoji></p>
|
2022-01-13 12:47:36 -08:00
|
|
|
<ReactMarkdown className="description" children={props.habit_notes} />
|
2021-11-20 17:11:13 +08:00
|
|
|
</div>
|
2021-10-19 10:54:06 +05:30
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default HabitItem
|