-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSkill.js
More file actions
40 lines (34 loc) · 932 Bytes
/
Copy pathSkill.js
File metadata and controls
40 lines (34 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from "react"
import ReactIcon from "../images/react.svg"
import Svelte from "../images/svelte.svg"
import CSS3 from "../images/css3.svg"
import HTML5 from "../images/html5.svg"
import Javascript from "../images/javascript.svg"
import "../css/components/Skill.css"
const Skill = props => {
const imgs = {
ReactJS: ReactIcon,
Svelte: Svelte,
Html: HTML5,
CSS: CSS3,
Javascript: Javascript,
}
const getSrc = name => {
if (imgs.hasOwnProperty(name)) {
return imgs[name]
}
}
return (
<div className="Skill" style={{ background: props.background }}>
<div className="Skill-header" style={{ background: props.background }}>
<div className="Skill-image">
<img src={getSrc(props.name)} alt={props.name} />
</div>
</div>
<div className="Skill-title">
<h2>{props.name}</h2>
</div>
</div>
)
}
export default Skill