You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
2 years ago
|
import React from 'react';
|
||
|
import AlbumDetails from 'Artist/Index/Select/AlbumStudio/AlbumDetails';
|
||
|
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
|
||
|
import Popover from 'Components/Tooltip/Popover';
|
||
|
import TooltipPosition from 'Helpers/Props/TooltipPosition';
|
||
|
import translate from 'Utilities/String/translate';
|
||
|
import styles from './AlbumsCell.css';
|
||
|
|
||
|
interface SeriesStatusCellProps {
|
||
|
className: string;
|
||
|
artistId: number;
|
||
|
albumCount: number;
|
||
|
isSelectMode: boolean;
|
||
|
}
|
||
|
|
||
|
function AlbumsCell(props: SeriesStatusCellProps) {
|
||
|
const { className, artistId, albumCount, isSelectMode, ...otherProps } =
|
||
|
props;
|
||
|
|
||
|
return (
|
||
|
<VirtualTableRowCell className={className} {...otherProps}>
|
||
|
{isSelectMode && albumCount > 0 ? (
|
||
|
<Popover
|
||
|
className={styles.albumCount}
|
||
|
anchor={albumCount}
|
||
|
title={translate('AlbumDetails')}
|
||
|
body={<AlbumDetails artistId={artistId} />}
|
||
|
position={TooltipPosition.Left}
|
||
|
canFlip={true}
|
||
|
/>
|
||
|
) : (
|
||
|
albumCount
|
||
|
)}
|
||
|
</VirtualTableRowCell>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
export default AlbumsCell;
|