fix: fix logo gutter bg

This commit is contained in:
Roman Hotsiy 2019-05-13 12:17:17 +03:00
parent 4c59628e14
commit 81896d32b8
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
2 changed files with 6 additions and 7 deletions

View File

@ -4,6 +4,7 @@
### Bug Fixes ### Bug Fixes
* crash in node due to broken URL parsing ([8df2b97](https://github.com/Rebilly/ReDoc/commit/8df2b97)) * crash in node due to broken URL parsing ([8df2b97](https://github.com/Rebilly/ReDoc/commit/8df2b97))
* fix: fix logo gutter bg ([e43f7219](https://github.com/Rebilly/ReDoc/commit/e43f7219))

View File

@ -17,13 +17,11 @@ export class ApiLogo extends React.Component<{ info: OpenAPIInfo }> {
// Use the english word logo if no alt text is provided // Use the english word logo if no alt text is provided
const altText = logoInfo.altText ? logoInfo.altText : 'logo'; const altText = logoInfo.altText ? logoInfo.altText : 'logo';
const logo = ( const logo = <LogoImgEl src={logoInfo.url} alt={altText} />;
<LogoImgEl return (
src={logoInfo.url} <LogoWrap style={{ backgroundColor: logoInfo.backgroundColor }}>
style={{ backgroundColor: logoInfo.backgroundColor }} {logoHref ? LinkWrap(logoHref)(logo) : logo}
alt={altText} </LogoWrap>
/>
); );
return <LogoWrap>{logoHref ? LinkWrap(logoHref)(logo) : logo}</LogoWrap>;
} }
} }