Skip to content

Commit 9ca5bd3

Browse files
committed
client(LineInput.tsx): the icon preview now displays the icon properly
1 parent b2b2141 commit 9ca5bd3

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

client/src/components/input/LineInput.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import BlurOverlay from "../popups/BlurOverlay";
55
import LinePopup from "../popups/LinePopup";
66
import HoverText from "../hover/HoverText";
77
import { AiOutlineQuestionCircle } from "react-icons/ai";
8-
import { FaGithub } from "react-icons/fa";
98

109
interface InputProps {
1110
line: string;
@@ -108,21 +107,26 @@ const LineInput: FC<InputProps> = (props) => {
108107
{badges.map((badge) => {
109108
return (
110109
<div
110+
key={`${badge.iconName}-${Math.random()}`}
111111
onClick={() => removeBadge(badge)}
112112
className="flex items-center gap-3 py-[.45rem] px-3 bg-gh-bg-secondary
113113
cursor-pointer border border-solid border-gh-bg-secondary
114114
hover:border-gh-red transition-all duration-150"
115115
>
116-
<div
117-
className="text-gh-text-secondary"
118-
style={{
119-
color: badge.color,
120-
}}
121-
>
122-
<FaGithub />
116+
<div className="text-gh-text-secondary">
117+
{/* <FaGithub /> */}
118+
<img
119+
className="w-4 h-4"
120+
src={`https://cdn.simpleicons.org/${badge.iconName}/${
121+
badge.color === "auto"
122+
? ""
123+
: badge.color.replace("#", "")
124+
}`}
125+
alt="alt"
126+
/>
123127
</div>
124128

125-
<div className="font-semibold text-white font-dejavu text-[.75rem]">
129+
<div className="font-semibold text-white font-dejavu text-[.7rem] tracking-wider">
126130
{badge.label.toUpperCase()}
127131
</div>
128132
</div>

0 commit comments

Comments
 (0)