Skip to content

Commit b359481

Browse files
committed
✨ Add new component PhotoUserCollab
1 parent 973bf9b commit b359481

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from "react";
2+
3+
import { Container, PhotoUser } from "./styles";
4+
import ImageUserDefault from "../../img/userdefault.jpg";
5+
6+
const PhotoUserCollab = ({ img }) => (
7+
<Container>
8+
<PhotoUser src={img ? img : ImageUserDefault} />
9+
</Container>
10+
);
11+
12+
export default PhotoUserCollab;
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import styled from "styled-components";
2+
3+
export const Container = styled.div`
4+
height: 40px;
5+
width: 40px;
6+
border-radius: 50%;
7+
vertical-align: top;
8+
justify-content: center;
9+
align-items: center;
10+
overflow: hidden;
11+
text-decoration: none;
12+
border: 0;
13+
margin: 10px;
14+
position: relative;
15+
16+
@media (max-width: 767.98px) {
17+
display: none;
18+
}
19+
`;
20+
21+
export const PhotoUser = styled.img`
22+
margin: 0;
23+
position: absolute;
24+
top: 50%;
25+
left: 50%;
26+
margin-right: -50%;
27+
transform: translate(-50%, -50%)
28+
`;

0 commit comments

Comments
 (0)