diff options
author | Emelia Smith <ThisIsMissEm@users.noreply.github.com> | 2018-04-08 14:26:58 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-04-08 14:26:58 +0200 |
commit | c9cbb8de703e321c0d152813a2e22471ffe5eef7 (patch) | |
tree | a3eb48de58112ca009f9867f7b4111715572cd8f /app/javascript/mastodon/features/compose/index.js | |
parent | cd0eaa349ca5d7e53e2ed246e70e99fc61c98370 (diff) |
Add search item to tab bar for mobile devices (#7072)
* Add search item to tab bar for mobile devices * Fix missing prop validation
Diffstat (limited to 'app/javascript/mastodon/features/compose/index.js')
-rw-r--r-- | app/javascript/mastodon/features/compose/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/compose/index.js b/app/javascript/mastodon/features/compose/index.js index d5cd854db..da5bf7cff 100644 --- a/app/javascript/mastodon/features/compose/index.js +++ b/app/javascript/mastodon/features/compose/index.js @@ -38,6 +38,7 @@ export default class Compose extends React.PureComponent { columns: ImmutablePropTypes.list.isRequired, multiColumn: PropTypes.bool, showSearch: PropTypes.bool, + isSearchPage: PropTypes.bool, intl: PropTypes.object.isRequired, }; @@ -58,7 +59,7 @@ export default class Compose extends React.PureComponent { } render () { - const { multiColumn, showSearch, intl } = this.props; + const { multiColumn, showSearch, isSearchPage, intl } = this.props; let header = ''; @@ -102,7 +103,7 @@ export default class Compose extends React.PureComponent { )} </div> - <Motion defaultStyle={{ x: -100 }} style={{ x: spring(showSearch ? 0 : -100, { stiffness: 210, damping: 20 }) }}> + <Motion defaultStyle={{ x: isSearchPage ? 0 : -100 }} style={{ x: spring(showSearch || isSearchPage ? 0 : -100, { stiffness: 210, damping: 20 }) }}> {({ x }) => ( <div className='drawer__inner darker' style={{ transform: `translateX(${x}%)`, visibility: x === -100 ? 'hidden' : 'visible' }}> <SearchResultsContainer /> |