From e05b20eb91419ff44fcd510fbf3e29b450ced788 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 23 Aug 2024 16:03:01 +0800 Subject: [PATCH] chore:paramter extrctor ui --- .../components/reasoning-mode-picker.tsx | 41 +++++-------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/web/app/components/workflow/nodes/parameter-extractor/components/reasoning-mode-picker.tsx b/web/app/components/workflow/nodes/parameter-extractor/components/reasoning-mode-picker.tsx index 9c77759d1a..f4fd6e85a6 100644 --- a/web/app/components/workflow/nodes/parameter-extractor/components/reasoning-mode-picker.tsx +++ b/web/app/components/workflow/nodes/parameter-extractor/components/reasoning-mode-picker.tsx @@ -4,31 +4,10 @@ import React, { useCallback } from 'react' import { useTranslation } from 'react-i18next' import { ReasoningModeType } from '../types' import Field from '../../_base/components/field' -import cn from '@/utils/classnames' +import OptionCard from '../../_base/components/option-card' const i18nPrefix = 'workflow.nodes.parameterExtractor' -type ItemProps = { - isChosen: boolean - text: string - onClick: () => void -} - -const Item: FC = ({ - isChosen, - text, - onClick, -}) => { - return ( -
!isChosen ? onClick() : () => { }} - > - {text} -
- ) -} - type Props = { type: ReasoningModeType onChange: (type: ReasoningModeType) => void @@ -51,16 +30,16 @@ const ReasoningModePicker: FC = ({ title={t(`${i18nPrefix}.reasoningMode`)} tooltip={t(`${i18nPrefix}.reasoningModeTip`)!} > -
- + -