This commit is contained in:
Sean Yesmunt 2019-07-29 10:49:43 -04:00
parent cf30dc03f5
commit 91d3fa91f3
3 changed files with 6 additions and 5 deletions

View file

@ -42,6 +42,10 @@ export default function ClaimTags(props: Props) {
} }
} }
if (!tagsToDisplay.length) {
return null;
}
return ( return (
<div className={classnames('file-properties', { 'file-properties--large': type === 'large' })}> <div className={classnames('file-properties', { 'file-properties--large': type === 'large' })}>
{tagsToDisplay.map(tag => ( {tagsToDisplay.map(tag => (

View file

@ -4,9 +4,7 @@ import classnames from 'classnames';
import Button from 'component/button'; import Button from 'component/button';
import { useRect } from '@reach/rect'; import { useRect } from '@reach/rect';
// Note: const COLLAPSED_HEIGHT = 120;
// When we use this in other parts of the app, we will probably need to
// add props for collapsed height
type Props = { type Props = {
children: React$Node | Array<React$Node>, children: React$Node | Array<React$Node>,
@ -24,7 +22,7 @@ export default function Expandable(props: Props) {
return ( return (
<div ref={ref}> <div ref={ref}>
{rect && rect.height > 120 ? ( {rect && rect.height > COLLAPSED_HEIGHT ? (
<div ref={ref} className="expandable"> <div ref={ref} className="expandable">
<div <div
className={classnames({ className={classnames({

View file

@ -1,5 +1,4 @@
.expandable { .expandable {
//border-bottom: 1px solid $lbry-gray-1;
margin-bottom: var(--spacing-medium); margin-bottom: var(--spacing-medium);
padding-bottom: var(--spacing-medium); padding-bottom: var(--spacing-medium);