From 14566b3e30e8a4935b2345e52a602603316276c0 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 23 Nov 2017 11:38:18 +0200 Subject: [PATCH] Center logo --- src/components/ApiLogo/ApiLogo.tsx | 8 ++++++-- src/components/ApiLogo/styled.elements.ts | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/ApiLogo/ApiLogo.tsx b/src/components/ApiLogo/ApiLogo.tsx index 8a431e39..05acda2f 100644 --- a/src/components/ApiLogo/ApiLogo.tsx +++ b/src/components/ApiLogo/ApiLogo.tsx @@ -1,7 +1,7 @@ import { OpenAPIInfo } from '../../types'; import * as React from 'react'; import { observer } from 'mobx-react'; -import { LogoImgEl } from './styled.elements'; +import { LogoImgEl, LogoWrap } from './styled.elements'; const LinkWrap = url => Component => {Component}; @@ -15,6 +15,10 @@ export class ApiLogo extends React.Component<{ info: OpenAPIInfo }> { const logo = ( ); - return info.contact && info.contact.url ? LinkWrap(info.contact.url)(logo) : logo; + return ( + + {info.contact && info.contact.url ? LinkWrap(info.contact.url)(logo) : logo}{' '} + + ); } } diff --git a/src/components/ApiLogo/styled.elements.ts b/src/components/ApiLogo/styled.elements.ts index 5089360a..3d1099ec 100644 --- a/src/components/ApiLogo/styled.elements.ts +++ b/src/components/ApiLogo/styled.elements.ts @@ -6,3 +6,7 @@ export const LogoImgEl = styled.img` display: inline-block; max-width: 100%; `; + +export const LogoWrap = styled.div` + text-align: center; +`;