Merge pull request #12 from SuperChamp234/emoji-fix

Emoji fix
This commit is contained in:
Zain 2021-11-16 19:01:51 +05:30 committed by GitHub
commit 4361341f56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 9 deletions

View file

@ -31,6 +31,7 @@
"node-fetch": "^3.0.0", "node-fetch": "^3.0.0",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-emoji-render": "^1.2.4",
"react-tabs": "^3.2.2" "react-tabs": "^3.2.2"
} }
} }

View file

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

View file

@ -1,3 +1,4 @@
import Emoji from "react-emoji-render";
import * as React from "react"; import * as React from "react";
function HabitItem(props: any) { function HabitItem(props: any) {
@ -6,7 +7,7 @@ function HabitItem(props: any) {
<button className="habit-plus" id={"plus"+props.id} onClick={props.onChange}> <button className="habit-plus" id={"plus"+props.id} onClick={props.onChange}>
+{props.upCount} +{props.upCount}
</button> </button>
<p className="habit-text">{props.habit_text}</p> <p className="habit-text"><Emoji text = {props.habit_text}></Emoji></p>
<button className="habit-minus" id={"mins"+props.id} onClick={props.onChange}> <button className="habit-minus" id={"mins"+props.id} onClick={props.onChange}>
-{props.downCount} -{props.downCount}
</button> </button>

View file

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

View file

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

View file

@ -23,7 +23,7 @@
.habit-text { .habit-text {
text-align: center !important; text-align: center !important;
padding: 0px; padding: 0px;
width: 80px; width: 50%;
margin-right: 20px; margin-right: 20px;
} }