verdaccio-ui/src/components/Logo/Logo.tsx
Priscila Oliveira ae73772a37 feat(eslint-config): add order rule in import
* refactor: added eslint-plugin-import

* refactor: disable some rules for muiComponents

* fix: fixed import
2019-10-07 22:19:18 +02:00

33 lines
653 B
TypeScript

import React from 'react';
import styled from 'react-emotion';
import logo from './img/logo.svg';
export enum Size {
Small = '40px',
Big = '90px',
}
interface Props {
size?: Size;
}
const StyledLogo = styled('div')<Props>`
&& {
display: inline-block;
vertical-align: middle;
box-sizing: border-box;
background-position: center;
background-size: contain;
background-image: url(${logo});
background-repeat: no-repeat;
width: ${({ size }) => size};
height: ${({ size }) => size};
}
`;
const Logo: React.FC<Props> = ({ size = Size.Small }) => {
return <StyledLogo size={size} />;
};
export default Logo;