mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-19 20:16:49 +08:00
### What problem does this PR solve? Feat: Add FormContainer component #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
21
web/src/components/form-container.tsx
Normal file
21
web/src/components/form-container.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
import { cn } from '@/lib/utils';
|
||||
import { PropsWithChildren } from 'react';
|
||||
|
||||
type FormContainerProps = {
|
||||
className?: string;
|
||||
show?: boolean;
|
||||
} & PropsWithChildren;
|
||||
|
||||
export function FormContainer({
|
||||
children,
|
||||
show = true,
|
||||
className,
|
||||
}: FormContainerProps) {
|
||||
return show ? (
|
||||
<section className={cn('border rounded-lg p-5 space-y-5', className)}>
|
||||
{children}
|
||||
</section>
|
||||
) : (
|
||||
children
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user