Joel 5375d9bb27
feat: the frontend part of mcp (#22131)
Co-authored-by: jZonG <jzongcode@gmail.com>
Co-authored-by: Novice <novice12185727@gmail.com>
Co-authored-by: nite-knite <nkCoding@gmail.com>
Co-authored-by: Hanqing Zhao <sherry9277@gmail.com>
2025-07-10 14:14:02 +08:00

28 lines
640 B
TypeScript

import { memo } from 'react'
import { useTranslation } from 'react-i18next'
import cn from '@/utils/classnames'
const Placeholder = ({
compact,
value,
className,
}: {
compact?: boolean
value?: string | JSX.Element
className?: string
}) => {
const { t } = useTranslation()
return (
<div className={cn(
className,
'pointer-events-none absolute left-0 top-0 h-full w-full select-none text-sm text-components-input-text-placeholder',
compact ? 'text-[13px] leading-5' : 'text-sm leading-6',
)}>
{value || t('common.promptEditor.placeholder')}
</div>
)
}
export default memo(Placeholder)