]> cat aescling's git repositories - mastodon.git/commitdiff
feat(ShowMore): Add classname to show more/show less button (#6904)
authorStephen Burgess <stephenburgess8@gmail.com>
Mon, 26 Mar 2018 11:59:44 +0000 (07:59 -0400)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 26 Mar 2018 11:59:44 +0000 (13:59 +0200)
app/javascript/mastodon/components/status_content.js

index b6082f008fd562af68dbc51232aa82f4b980bc59..9b86592f67c2212cf9594616f4ee12d9b903d8c2 100644 (file)
@@ -158,7 +158,7 @@ export default class StatusContent extends React.PureComponent {
           <p style={{ marginBottom: hidden && status.get('mentions').isEmpty() ? '0px' : null }}>
             <span dangerouslySetInnerHTML={spoilerContent} />
             {' '}
-            <button tabIndex='0' className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>{toggleText}</button>
+            <button tabIndex='0' className={`status__content__spoiler-link ${hidden ? 'status__content__spoiler-link--show-more' : 'status__content__spoiler-link--show-less'}`} onClick={this.handleSpoilerClick}>{toggleText}</button>
           </p>
 
           {mentionsPlaceholder}