mirror of https://github.com/garritfra/garrit.xyz
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
867 B
30 lines
867 B
import React, { useState } from "react"; |
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; |
|
import { faStar } from "@fortawesome/free-solid-svg-icons"; |
|
import "./SkillCard.scss"; |
|
import AnalyticsProvider from "../../../util/AnalyticsProvider"; |
|
|
|
export default function SkillCard({ name, logo, rating }) { |
|
return ( |
|
<div |
|
className="card" |
|
onClick={() => |
|
AnalyticsProvider.getInstance().logEvent("Skills", "clicked", name) |
|
} |
|
> |
|
<img className="skill-logo" src={logo} /> |
|
<div className="text">{name}</div> |
|
<div className="star-container"> |
|
{Array.from({ length: rating }).map(x => { |
|
return ( |
|
<FontAwesomeIcon |
|
color="gold" |
|
icon={faStar} |
|
style={{ margin: "2px" }} |
|
/> |
|
); |
|
})} |
|
</div> |
|
</div> |
|
); |
|
}
|
|
|