Skip to content

Commit

Permalink
Merge pull request #7801 from Automattic/update/site-selector-search-…
Browse files Browse the repository at this point in the history
…display-logic

SiteSelector: display search with less than 6 sites but more hidden ones
  • Loading branch information
mtias authored Sep 1, 2016
2 parents 6bb2e62 + 3d7cb77 commit fc2ba72
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/components/site-selector/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,12 @@ const SiteSelector = React.createClass( {
},

render() {
const hiddenSitesCount = this.props.siteCount - this.props.visibleSiteCount;
const selectorClass = classNames( 'site-selector', 'sites-list', {
'is-large': this.props.siteCount > 6,
'is-large': this.props.siteCount > 6 || hiddenSitesCount > 0,
'is-single': this.props.visibleSiteCount === 1
} );

const hiddenSitesCount = this.props.siteCount - this.props.visibleSiteCount;

return (
<div className={ selectorClass }>
<Search
Expand Down

0 comments on commit fc2ba72

Please sign in to comment.