xref: /MusicFree/src/components/mediaItem/LyricItem.tsx (revision 1119c2ea435417cd5c53719f91691ff2b1aa8670)
139ac60f7S猫头猫import React from 'react';
2*1119c2eaS猫头猫import ListItem from '@/components/base/listItem';
339ac60f7S猫头猫import {ImgAsset} from '@/constants/assetsConst';
4*1119c2eaS猫头猫import TitleAndTag from './titleAndTag';
539ac60f7S猫头猫
639ac60f7S猫头猫interface IAlbumResultsProps {
739ac60f7S猫头猫    lyricItem: ILyric.ILyricItem;
839ac60f7S猫头猫    onPress?: (musicItem: ILyric.ILyricItem) => void;
939ac60f7S猫头猫}
1039ac60f7S猫头猫export default function LyricItem(props: IAlbumResultsProps) {
1139ac60f7S猫头猫    const {lyricItem, onPress} = props;
1239ac60f7S猫头猫
1339ac60f7S猫头猫    return (
1439ac60f7S猫头猫        <ListItem
15*1119c2eaS猫头猫            heightType="big"
16*1119c2eaS猫头猫            withHorizonalPadding
1739ac60f7S猫头猫            onPress={() => {
1839ac60f7S猫头猫                onPress?.(lyricItem);
19*1119c2eaS猫头猫            }}>
20*1119c2eaS猫头猫            <ListItem.ListItemImage
21*1119c2eaS猫头猫                uri={lyricItem.artwork}
22*1119c2eaS猫头猫                fallbackImg={ImgAsset.albumDefault}
2339ac60f7S猫头猫            />
24*1119c2eaS猫头猫            <ListItem.Content
25*1119c2eaS猫头猫                description={lyricItem.artist ?? ''}
26*1119c2eaS猫头猫                title={
27*1119c2eaS猫头猫                    <TitleAndTag
28*1119c2eaS猫头猫                        title={lyricItem.title}
29*1119c2eaS猫头猫                        tag={lyricItem.platform}
30*1119c2eaS猫头猫                    />
31*1119c2eaS猫头猫                }
32*1119c2eaS猫头猫            />
33*1119c2eaS猫头猫        </ListItem>
3439ac60f7S猫头猫    );
3539ac60f7S猫头猫}
36