mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
19 lines
699 B
TypeScript
19 lines
699 B
TypeScript
import clsx from 'clsx';
|
|
|
|
import styles from './title-column.module.css';
|
|
|
|
import { ItemDetailListCellProps } from '/@/renderer/components/item-list/item-detail-list/columns/types';
|
|
import { useIsCurrentSong } from '/@/renderer/features/player/hooks/use-is-current-song';
|
|
import { ExplicitIndicator } from '/@/shared/components/explicit-indicator/explicit-indicator';
|
|
|
|
export const TitleColumn = ({ song }: ItemDetailListCellProps) => {
|
|
const { isActive } = useIsCurrentSong(song);
|
|
|
|
return (
|
|
<span className={clsx({ [styles.active]: isActive })}>
|
|
<ExplicitIndicator explicitStatus={song.explicitStatus} />
|
|
{song.name ?? <> </>}
|
|
</span>
|
|
);
|
|
};
|