Add tooltip to path & movie title on the movie index table view

pull/2/head
nitsua 5 years ago committed by Qstick
parent 587e6b570c
commit 02845c72d3

@ -5,12 +5,14 @@ import styles from './VirtualTableRowCell.css';
function VirtualTableRowCell(props) { function VirtualTableRowCell(props) {
const { const {
className, className,
children children,
title
} = props; } = props;
return ( return (
<div <div
className={className} className={className}
title={title}
> >
{children} {children}
</div> </div>
@ -19,11 +21,13 @@ function VirtualTableRowCell(props) {
VirtualTableRowCell.propTypes = { VirtualTableRowCell.propTypes = {
className: PropTypes.string.isRequired, className: PropTypes.string.isRequired,
children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]) children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
title: PropTypes.string
}; };
VirtualTableRowCell.defaultProps = { VirtualTableRowCell.defaultProps = {
className: styles.cell className: styles.cell,
title: ''
}; };
export default VirtualTableRowCell; export default VirtualTableRowCell;

@ -277,6 +277,7 @@ class MovieIndexRow extends Component {
<VirtualTableRowCell <VirtualTableRowCell
key={name} key={name}
className={styles[name]} className={styles[name]}
title={path}
> >
{path} {path}
</VirtualTableRowCell> </VirtualTableRowCell>

@ -13,7 +13,10 @@ class MovieTitleLink extends PureComponent {
const link = `/movie/${titleSlug}`; const link = `/movie/${titleSlug}`;
return ( return (
<Link to={link}> <Link
to={link}
title={title}
>
{title} {title}
</Link> </Link>
); );

Loading…
Cancel
Save