fix: step 2 preview ui padding

pull/12097/head
AkaraChen 1 year ago
parent 07f0140d10
commit 6383a64419

@ -113,11 +113,11 @@ const defaultParentChildConfig: ParentChildConfig = {
chunkForContext: 'paragraph', chunkForContext: 'paragraph',
parent: { parent: {
delimiter: '\\n\\n', delimiter: '\\n\\n',
maxLength: 4000, maxLength: 500,
}, },
child: { child: {
delimiter: '\\n\\n', delimiter: '\\n\\n',
maxLength: 4000, maxLength: 200,
}, },
} }
@ -922,7 +922,8 @@ const StepTwo = ({
<Badge text='276 Estimated chunks' /> <Badge text='276 Estimated chunks' />
</div> </div>
</PreviewHeader>} </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 && ( {docForm === ChuckingMode.qa && estimate?.qa_preview && (
estimate?.qa_preview.map(item => ( estimate?.qa_preview.map(item => (

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

Loading…
Cancel
Save