diff --git a/src/components/Loading/Loading.tsx b/src/components/Loading/Loading.tsx index 17d23c1..8e32a4c 100644 --- a/src/components/Loading/Loading.tsx +++ b/src/components/Loading/Loading.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import Logo from '../Logo'; +import Logo, { Size } from '../Logo'; import Spinner from '../Spinner'; import { Wrapper, Badge } from './styles'; @@ -8,7 +8,7 @@ import { Wrapper, Badge } from './styles'; const Loading: React.FC = () => ( - + diff --git a/src/components/Loading/__snapshots__/Loading.test.tsx.snap b/src/components/Loading/__snapshots__/Loading.test.tsx.snap index 680cd3a..5d29230 100644 --- a/src/components/Loading/__snapshots__/Loading.test.tsx.snap +++ b/src/components/Loading/__snapshots__/Loading.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[` component should render the component in default state 1`] = `"
"`; +exports[` component should render the component in default state 1`] = `"
"`; diff --git a/src/components/Logo/Logo.tsx b/src/components/Logo/Logo.tsx index 75c52ae..b8abe82 100644 --- a/src/components/Logo/Logo.tsx +++ b/src/components/Logo/Logo.tsx @@ -3,7 +3,16 @@ import React from 'react'; import styled from 'react-emotion'; import logo from './img/logo.svg'; -const StyledLogo = styled('div')` +export enum Size { + Small = '40px', + Big = '90px', +} + +interface Props { + size?: Size; +} + +const StyledLogo = styled('div')` && { display: inline-block; vertical-align: middle; @@ -12,11 +21,11 @@ const StyledLogo = styled('div')` background-size: contain; background-image: url(${logo}); background-repeat: no-repeat; - width: 40px; - height: 40px;`; - -const Logo: React.FC = () => { - return ; + width: ${({ size }) => size}; + height: ${({ size }) => size}; +`; +const Logo: React.FC = ({ size = Size.Small }) => { + return ; }; export default Logo; diff --git a/src/components/Logo/index.ts b/src/components/Logo/index.ts index a5be778..de10cb2 100644 --- a/src/components/Logo/index.ts +++ b/src/components/Logo/index.ts @@ -1 +1 @@ -export { default } from './Logo'; +export { default, Size } from './Logo';