import TextInputArea from '@/components/TextInputArea'; import { CopyButton } from '@/components/CopyButton'; import SwitchButtonGroup from '@/components/SwitchButtonGroup'; import { Button } from '@/components/ui/button'; import { useTextMode } from '../useTextMode'; interface TextModeProps { onSwitchToImageMode?: () => void; } export default function TextMode({ onSwitchToImageMode }: TextModeProps) { const { input, setInput, direction, handleDirectionChange, placeholder, output, outputLabel, error, showImageHint, handleClear, } = useTextMode(); return (
{showImageHint && (
检测到图片的 data URI,请使用「图像」选项卡进行解码。
)} {output && (
{outputLabel}
2000 ? `${output.substring(0, 2000)}...` : output} showClear={false} minRows={4} />
)}
); }