Skip to content

Commit

Permalink
Use classnames() for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed May 2, 2019
1 parent c41bd8d commit 2b53dd9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion assets/src/blocks/amp-story-page/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import uuid from 'uuid/v4';
import classnames from 'classnames';

/**
* WordPress dependencies
Expand Down Expand Up @@ -276,7 +277,13 @@ class EditPage extends Component {
modalClass="editor-amp-story-background-video-poster__media-modal"
render={ ( { open } ) => (
<Button
className={ 'editor-amp-story-page-background ' + ( ! poster ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview' ) }
className={ classnames(
'editor-amp-story-page-background',
{
'editor-post-featured-image__toggle': ! poster,
'editor-post-featured-image__preview': poster,
}
) }
onClick={ open }
aria-label={ ! poster ? null : __( 'Edit or update the poster image', 'amp' ) }
>
Expand Down

0 comments on commit 2b53dd9

Please sign in to comment.