fix: handle show child trunck

pull/12097/head
Joel 1 year ago
parent 8f56c6a7fa
commit ab7df47768

@ -14,13 +14,13 @@ const ChildChunks: FC<Props> = ({
payload, payload,
isShowAll, isShowAll,
}) => { }) => {
const { id, score, content } = payload const { id, score, content, position } = payload
return ( return (
<div <div
className={!isShowAll ? 'line-clamp-2' : ''} className={!isShowAll ? 'line-clamp-2' : ''}
> >
<div className='inline-flex items-center relative top-[-3px]'> <div className='inline-flex items-center relative top-[-3px]'>
<div className='flex items-center h-[24px] bg-state-accent-solid system-2xs-semibold-uppercase text-text-primary-on-surface px-1'>C-{id}</div> <div className='flex items-center h-[24px] bg-state-accent-solid system-2xs-semibold-uppercase text-text-primary-on-surface px-1'>C-{position}</div>
<Score value={score} besideChunkName /> <Score value={score} besideChunkName />
</div> </div>
<SliceContent className='bg-state-accent-hover group-hover:bg-state-accent-hover text-text-secondary font-normal'>{content}</SliceContent> <SliceContent className='bg-state-accent-hover group-hover:bg-state-accent-hover text-text-secondary font-normal'>{content}</SliceContent>

@ -482,6 +482,7 @@ export type HitTestingRecord = {
export type HitTestingChildChunk = { export type HitTestingChildChunk = {
id: string id: string
content: string content: string
position: number
score: number score: number
} }
export type HitTesting = { export type HitTesting = {

Loading…
Cancel
Save