fix: step 2 preview ui padding

This commit is contained in:
AkaraChen 2024-12-06 16:16:30 +08:00
parent 07f0140d10
commit 6383a64419
2 changed files with 7 additions and 5 deletions

View File

@ -113,11 +113,11 @@ const defaultParentChildConfig: ParentChildConfig = {
chunkForContext: 'paragraph',
parent: {
delimiter: '\\n\\n',
maxLength: 4000,
maxLength: 500,
},
child: {
delimiter: '\\n\\n',
maxLength: 4000,
maxLength: 200,
},
}
@ -922,7 +922,8 @@ const StepTwo = ({
<Badge text='276 Estimated chunks' />
</div>
</PreviewHeader>}
className={cn(s.previewWrap, isMobile && s.isMobile, 'relative h-full overflow-y-scroll space-y-4')}
className={cn(s.previewWrap, isMobile && s.isMobile, 'relative h-full overflow-y-scroll')}
mainClassName='space-y-6'
>
{docForm === ChuckingMode.qa && estimate?.qa_preview && (
estimate?.qa_preview.map(item => (

View File

@ -4,10 +4,11 @@ import classNames from '@/utils/classnames'
export type PreviewContainerProps = ComponentProps<'div'> & {
header: ReactNode
mainClassName?: string
}
export const PreviewContainer: FC<PreviewContainerProps> = forwardRef((props, ref) => {
const { children, className, header, ...rest } = props
const { children, className, header, mainClassName, ...rest } = props
return <div
{...rest}
ref={ref}
@ -19,7 +20,7 @@ export const PreviewContainer: FC<PreviewContainerProps> = forwardRef((props, re
<header className='py-4 pl-5 pr-3 border-b border-divider-subtle'>
{header}
</header>
<main className='py-5 px-6 w-full h-full'>
<main className={classNames('py-5 px-6 w-full h-full', mainClassName)}>
{children}
</main>
</div>