2019-06-20 19:37:28 +07:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import styled from 'react-emotion';
|
|
|
|
import logo from './img/logo.svg';
|
|
|
|
|
2019-07-10 16:25:12 +07:00
|
|
|
export enum Size {
|
|
|
|
Small = '40px',
|
|
|
|
Big = '90px',
|
|
|
|
}
|
|
|
|
|
2019-07-09 23:45:35 +07:00
|
|
|
interface Props {
|
2019-07-10 16:25:12 +07:00
|
|
|
size?: Size;
|
2019-07-09 23:45:35 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
const StyledLogo = styled('div')<Props>`
|
2019-06-20 19:37:28 +07:00
|
|
|
&& {
|
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
|
|
|
box-sizing: border-box;
|
|
|
|
background-position: center;
|
|
|
|
background-size: contain;
|
|
|
|
background-image: url(${logo});
|
|
|
|
background-repeat: no-repeat;
|
2019-07-10 16:25:12 +07:00
|
|
|
width: ${({ size }) => size};
|
|
|
|
height: ${({ size }) => size};
|
2019-07-15 19:43:44 +07:00
|
|
|
}
|
2019-07-09 23:45:35 +07:00
|
|
|
`;
|
2019-07-10 16:25:12 +07:00
|
|
|
const Logo: React.FC<Props> = ({ size = Size.Small }) => {
|
|
|
|
return <StyledLogo size={size} />;
|
2019-06-20 19:37:28 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
export default Logo;
|