cleanup
This commit is contained in:
parent
cf30dc03f5
commit
91d3fa91f3
3 changed files with 6 additions and 5 deletions
|
@ -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 => (
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue