2021-11-20 13:49:24 +08:00
|
|
|
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-11-20 13:49:24 +08:00
|
|
|
function RewardItem(props: any) {
|
|
|
|
|
return (
|
2022-01-13 12:47:36 -08:00
|
|
|
<div className="habit-item" id={props.id}>
|
|
|
|
|
<div className="habit-button-grp">
|
|
|
|
|
<button className="habit-button" id={props.id} onClick={props.onChange}>-{props.reward_value}</button>
|
|
|
|
|
</div>
|
2021-11-20 17:11:13 +08:00
|
|
|
<div>
|
2022-01-13 12:47:36 -08:00
|
|
|
<p className="habit-text"><Emoji text={props.reward_text}></Emoji></p>
|
|
|
|
|
<ReactMarkdown className="description" children={props.reward_notes} />
|
2021-11-20 17:11:13 +08:00
|
|
|
</div>
|
|
|
|
|
|
2021-11-20 13:49:24 +08:00
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default RewardItem
|