27 lines
504 B
JavaScript
27 lines
504 B
JavaScript
import React from 'react';
|
|
import styled from 'styled-components';
|
|
|
|
|
|
export default ({ url , name , column })=>{
|
|
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;
|
|
}`
|
|
}
|
|
`;
|
|
return(
|
|
<Img>
|
|
{ url && <img src={url} alt=""/> }
|
|
<span>{name}</span>
|
|
</Img>
|
|
)
|
|
} |