forked from Gitlink/forgeplus-react
36 lines
735 B
JavaScript
36 lines
735 B
JavaScript
import React from 'react';
|
|
import styled from 'styled-components';
|
|
import { Link } from 'react-router-dom';
|
|
|
|
export default ({ url , name , column , id , login })=>{
|
|
const Img = styled.span`
|
|
display:flex;
|
|
${column && "flex-direction: column;text-align:center;"}
|
|
align-items: center;
|
|
& img{
|
|
width:30px;
|
|
height:30px;
|
|
border-radius:50%;
|
|
}
|
|
${!column && `
|
|
& span{
|
|
margin-left:8px;
|
|
font-weight: bold;
|
|
}`
|
|
}
|
|
`;
|
|
return(
|
|
id?
|
|
<Link to={`/${login}`}>
|
|
<Img>
|
|
{ url && <img src={url} alt=""/> }
|
|
<span>{name}</span>
|
|
</Img>
|
|
</Link>
|
|
:
|
|
<Img>
|
|
{ url && <img src={url} alt=""/> }
|
|
<span>{name}</span>
|
|
</Img>
|
|
)
|
|
} |