On mobile, hide title if logo exists (#629)

* On mobile, hide title if logo exists

* Run Prettier, use ternary, reorder

* Rename class for clarity

* Update main.css
This commit is contained in:
Amy Lam 2018-05-03 10:54:25 -07:00 committed by Yangshun Tay
parent 0fff8788fe
commit 7fa0f910ac
2 changed files with 8 additions and 6 deletions

View file

@ -213,6 +213,9 @@ class HeaderNav extends React.Component {
}
render() {
const headerClass = siteConfig.headerIcon
? 'headerTitleWithLogo'
: 'headerTitle';
const versionsLink =
this.props.baseUrl +
(env.translation.enabled
@ -235,7 +238,7 @@ class HeaderNav extends React.Component {
/>
)}
{!this.props.config.disableHeaderTitle && (
<h2 className="headerTitle">{this.props.title}</h2>
<h2 className={headerClass}>{this.props.title}</h2>
)}
</a>
{env.versioning.enabled && (