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

28 lines
749 B
React
Raw Normal View History

2019-06-11 20:10:58 +02: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 22:27:38 +02:00
import VideoDuration from 'component/videoDuration';
2019-06-11 20:10:58 +02:00
type Props = {
uri: string,
downloaded: boolean,
claimIsMine: boolean,
isSubscribed: boolean,
isNew: boolean,
};
export default function FileProperties(props: Props) {
2019-11-02 16:55:17 +01:00
const { uri, downloaded, claimIsMine, isSubscribed } = props;
2019-06-11 20:10:58 +02:00
return (
<div className="file-properties">
2019-06-28 09:33:07 +02:00
{isSubscribed && <Icon tooltip icon={icons.SUBSCRIBE} />}
{!claimIsMine && downloaded && <Icon tooltip icon={icons.DOWNLOAD} />}
<FilePrice hideFree uri={uri} />
<VideoDuration uri={uri} />
2019-06-11 20:10:58 +02:00
</div>
);
}