Use classNames

This commit is contained in:
Yamboy1 2020-02-01 14:47:13 +13:00 committed by Sean Yesmunt
parent 2ae3255d01
commit 4d19c86293
2 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,7 @@
// @flow // @flow
import * as React from 'react'; import * as React from 'react';
import { normalizeURI } from 'lbry-redux'; import { normalizeURI } from 'lbry-redux';
import classNames from 'classnames';
import FilePrice from 'component/filePrice'; import FilePrice from 'component/filePrice';
import FileAuthor from 'component/fileAuthor'; import FileAuthor from 'component/fileAuthor';
import FileViewCount from 'component/fileViewCount'; import FileViewCount from 'component/fileViewCount';
@ -28,11 +29,11 @@ function LayoutWrapperText(props: Props) {
const { uri, claim, title, nsfw, contentType, fileType } = props; const { uri, claim, title, nsfw, contentType, fileType } = props;
const markdownType = ['md', 'markdown']; const markdownType = ['md', 'markdown'];
const isMd = markdownType.includes(fileType) || contentType === 'text/markdown' || contentType === 'text/md'; const isMarkdown = markdownType.includes(fileType) || contentType === 'text/markdown' || contentType === 'text/md';
return ( return (
<div> <div>
<div className={`main__document-wrapper${isMd ? '-md' : ''}`}> <div className={classNames('main__document-wrapper', { 'main__document-wrapper--markdown': isMarkdown })}>
<ClaimUri uri={uri} /> <ClaimUri uri={uri} />
<div className="media__title"> <div className="media__title">

View file

@ -113,7 +113,7 @@
} }
} }
.main__document-wrapper-md { .main__document-wrapper--markdown {
@extend .main__document-wrapper; @extend .main__document-wrapper;
width: 40em; width: 40em;
max-width: unset; max-width: unset;