feat: llm input struct

This commit is contained in:
Joel
2024-02-18 14:33:44 +08:00
parent da0d9aab39
commit 3666462076
7 changed files with 87 additions and 18 deletions

View File

@ -1,22 +1,36 @@
'use client'
import type { FC } from 'react'
import React from 'react'
import cn from 'classnames'
import { HelpCircle } from '@/app/components/base/icons/src/vender/line/general'
import TooltipPlus from '@/app/components/base/tooltip-plus'
type Props = {
title: string
tooltip?: string
children: JSX.Element | string
operations?: JSX.Element
inline?: boolean
}
const Filed: FC<Props> = ({
title,
tooltip,
children,
operations,
inline,
}) => {
return (
<div>
<div className={cn(inline && 'flex justify-between items-center')}>
<div className='flex justify-between items-center'>
<div className='leading-[18px] text-xs font-medium text-gray-500 uppercase'>{title}</div>
<div className='flex items-center'>
<div className=' h-[18px] text-xs font-medium text-gray-500 uppercase'>{title}</div>
{tooltip && (
<TooltipPlus popupContent='tooltip'>
<HelpCircle className='w-3.5 h-3.5 ml-0.5 text-gray-400' />
</TooltipPlus>
)}
</div>
{operations && <div>{operations}</div>}
</div>
<div>{children}</div>

View File

@ -0,0 +1,18 @@
'use client'
import type { FC } from 'react'
import React from 'react'
import cn from 'classnames'
type Props = {
className?: string
}
const Split: FC<Props> = ({
className,
}) => {
return (
<div className={cn(className, 'h-px bg-black/5')}>
</div>
)
}
export default React.memo(Split)