fix: align logo by center

This commit is contained in:
Roman Hotsiy 2018-03-09 21:09:35 +02:00
parent 49c23c9345
commit 18ec3ac17b
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
2 changed files with 8 additions and 3 deletions

View File

@ -1,9 +1,7 @@
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import * as React from 'react'; import * as React from 'react';
import { OpenAPIInfo } from '../../types'; import { OpenAPIInfo } from '../../types';
import { LogoImgEl, LogoWrap } from './styled.elements'; import { LogoImgEl, LogoWrap, LinkWrap } from './styled.elements';
const LinkWrap = url => Component => <a href={url}>{Component}</a>;
@observer @observer
export class ApiLogo extends React.Component<{ info: OpenAPIInfo }> { export class ApiLogo extends React.Component<{ info: OpenAPIInfo }> {

View File

@ -1,3 +1,4 @@
import * as React from 'react';
import styled from '../../styled-components'; import styled from '../../styled-components';
export const LogoImgEl = styled.img` export const LogoImgEl = styled.img`
@ -10,3 +11,9 @@ export const LogoImgEl = styled.img`
export const LogoWrap = styled.div` export const LogoWrap = styled.div`
text-align: center; text-align: center;
`; `;
const Link = styled.a`
display: inline-block;
`;
export const LinkWrap = url => Component => <Link href={url}>{Component}</Link>;