File tree 2 files changed +40
-0
lines changed
src/components/PhotoUserCollab
2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
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 ;
Original file line number Diff line number Diff line change
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
+ ` ;
You can’t perform that action at this time.
0 commit comments