@ -6,11 +6,13 @@ import Field from './field'
import InputCombined from '../edit-metadata-batch/input-combined'
import { RiDeleteBinLine } from '@remixicon/react'
import Tooltip from '@/app/components/base/tooltip'
import cn from '@/utils/classnames'
type Props = {
title : string
titleTooltip? : string
headerRight? : React.ReactNode
contentClassName? : string
list : MetadataItemWithValue [ ]
isEdit? : boolean
onChange ? : ( item : MetadataItemWithValue ) = > void
@ -22,6 +24,7 @@ const InfoGroup: FC<Props> = ({
title ,
titleTooltip ,
headerRight ,
contentClassName ,
list ,
isEdit ,
onChange ,
@ -41,7 +44,7 @@ const InfoGroup: FC<Props> = ({
{ / * < d i v c l a s s N a m e = ' f l e x p x - 1 . 5 r o u n d e d - m d h o v e r : b g - c o m p o n e n t s - b u t t o n - t e r t i a r y - b g - h o v e r i t e m s - c e n t e r h - 6 s p a c e - x - 1 c u r s o r - p o i n t e r ' o n C l i c k = { ( ) = > s e t I s E d i t ( t r u e ) } >
< / div > * / }
< / div >
< div className = 'space-y-1' >
< div className = { cn ( 'mt-3 space-y-1' , contentClassName ) } >
{ list . map ( ( item , i ) = > (
< Field key = { item . id || ` ${ i } ` } label = { item . name } >
{ isEdit ? (
@ -52,11 +55,11 @@ const InfoGroup: FC<Props> = ({
value = { item . value }
onChange = { value = > onChange ? . ( { . . . item , value } ) }
/ >
< div className = 'shrink-0 p-1 rounded-md text-text-tertiary hover:text-text-destructive hover:bg-state-destructive-hover cursor-pointer'>
< div className = 'shrink-0 p-1 rounded-md text-text-tertiary hover:text-text-destructive hover:bg-state-destructive-hover cursor-pointer'>
< RiDeleteBinLine className = 'size-4' / >
< / div >
< / div >
) : ( < div className = ' system-xs-regular text-text-secondary'> { item . value } < / div > ) }
) : ( < div className = ' py-1 system-xs-regular text-text-secondary'> { item . value } < / div > ) }
< / Field >
) ) }
< / div >