mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 00:46:52 +08:00
### What problem does this PR solve? fix dataset-page's bugs,Input component supports icon, added Radio component, and removed antd from chunk-result-bar page [#3221 ](https://github.com/infiniflow/ragflow/issues/3221) ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
46 lines
1.0 KiB
TypeScript
46 lines
1.0 KiB
TypeScript
import { Button } from '@/components/ui/button';
|
|
import { X } from 'lucide-react';
|
|
import { useState } from 'react';
|
|
import CategoryPanel from './category-panel';
|
|
|
|
export default ({
|
|
tab = 'generalForm',
|
|
parserId,
|
|
}: {
|
|
tab: 'generalForm' | 'chunkMethodForm';
|
|
parserId: string;
|
|
}) => {
|
|
const [visible, setVisible] = useState(false);
|
|
|
|
return (
|
|
<div
|
|
style={{
|
|
display: tab === 'chunkMethodForm' ? 'block' : 'none',
|
|
}}
|
|
>
|
|
<Button
|
|
variant="outline"
|
|
onClick={() => {
|
|
setVisible(!visible);
|
|
}}
|
|
>
|
|
Learn More
|
|
</Button>
|
|
<div
|
|
className="bg-[#FFF]/10 p-[20px] rounded-[12px] mt-[10px] relative"
|
|
style={{ display: visible ? 'block' : 'none' }}
|
|
>
|
|
<CategoryPanel chunkMethod={parserId}></CategoryPanel>
|
|
<div
|
|
className="absolute right-1 top-1 cursor-pointer hover:text-[#FFF]/30"
|
|
onClick={() => {
|
|
setVisible(false);
|
|
}}
|
|
>
|
|
<X />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|