balibabu 740714b79d
feat: translate text from DuckDuckGo #918 (#1486)
### What problem does this PR solve?

feat: translate text from DuckDuckGo #918

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2024-07-12 15:22:36 +08:00

37 lines
890 B
TypeScript

import TopNItem from '@/components/top-n-item';
import { useTranslate } from '@/hooks/commonHooks';
import { Form, Select } from 'antd';
import { IOperatorForm } from '../interface';
const DuckDuckGoForm = ({ onValuesChange, form }: IOperatorForm) => {
const { t } = useTranslate('flow');
return (
<Form
name="basic"
labelCol={{ span: 6 }}
wrapperCol={{ span: 18 }}
autoComplete="off"
form={form}
onValuesChange={onValuesChange}
>
<TopNItem></TopNItem>
<Form.Item
label={t('channel')}
name={'channel'}
tooltip={t('channelTip')}
initialValue={'text'}
>
<Select
options={[
{ value: 'text', label: t('text') },
{ value: 'news', label: t('news') },
]}
></Select>
</Form.Item>
</Form>
);
};
export default DuckDuckGoForm;