lbry-desktop/ui/component/fileProperties/view.jsx

28 lines
749 B
React
Raw Normal View History

2019-06-11 14:10:58 -04:00
// @flow
import * as icons from 'constants/icons';
import * as React from 'react';
import Icon from 'component/common/icon';
import FilePrice from 'component/filePrice';
2019-06-27 16:27:38 -04:00
import VideoDuration from 'component/videoDuration';
2019-06-11 14:10:58 -04:00
type Props = {
uri: string,
downloaded: boolean,
claimIsMine: boolean,
isSubscribed: boolean,
isNew: boolean,
};
export default function FileProperties(props: Props) {
2019-11-02 11:55:17 -04:00
const { uri, downloaded, claimIsMine, isSubscribed } = props;
2019-06-11 14:10:58 -04:00
return (
<div className="file-properties">
2019-11-22 16:13:00 -05:00
<FilePrice hideFree uri={uri} />
<VideoDuration uri={uri} />
2019-06-28 03:33:07 -04:00
{isSubscribed && <Icon tooltip icon={icons.SUBSCRIBE} />}
{!claimIsMine && downloaded && <Icon tooltip icon={icons.DOWNLOAD} />}
2019-06-11 14:10:58 -04:00
</div>
);
}