1import React from 'react'; 2import ListItem from '@/components/base/listItem'; 3import {ImgAsset} from '@/constants/assetsConst'; 4import rpx from '@/utils/rpx'; 5 6interface IAlbumResultsProps { 7 lyricItem: ILyric.ILyricItem; 8 onPress?: (musicItem: ILyric.ILyricItem) => void; 9} 10const ITEM_HEIGHT = rpx(120); 11export default function LyricItem(props: IAlbumResultsProps) { 12 const {lyricItem, onPress} = props; 13 14 return ( 15 <ListItem 16 left={{ 17 artwork: lyricItem.artwork, 18 fallback: ImgAsset.albumDefault, 19 }} 20 itemHeight={ITEM_HEIGHT} 21 title={lyricItem.title} 22 desc={lyricItem.artist ?? ''} 23 tag={lyricItem.platform} 24 onPress={() => { 25 onPress?.(lyricItem); 26 }} 27 /> 28 ); 29} 30