fix: handle show child trunck

This commit is contained in:
Joel 2024-12-11 18:33:03 +08:00
parent 8f56c6a7fa
commit ab7df47768
2 changed files with 3 additions and 2 deletions

View File

@ -14,13 +14,13 @@ const ChildChunks: FC<Props> = ({
payload,
isShowAll,
}) => {
const { id, score, content } = payload
const { id, score, content, position } = payload
return (
<div
className={!isShowAll ? 'line-clamp-2' : ''}
>
<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 />
</div>
<SliceContent className='bg-state-accent-hover group-hover:bg-state-accent-hover text-text-secondary font-normal'>{content}</SliceContent>

View File

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