mirror of
https://github.com/langgenius/dify.git
synced 2026-06-13 04:01:12 +08:00
42 lines
860 B
TypeScript
42 lines
860 B
TypeScript
'use client'
|
|
|
|
import type { Fieldset as BaseFieldsetNS } from '@base-ui/react/fieldset'
|
|
import { Fieldset as BaseFieldset } from '@base-ui/react/fieldset'
|
|
import { cn } from '../cn'
|
|
|
|
export type FieldsetRootProps
|
|
= Omit<BaseFieldsetNS.Root.Props, 'className'>
|
|
& {
|
|
className?: string
|
|
}
|
|
|
|
export function FieldsetRoot({
|
|
className,
|
|
...props
|
|
}: FieldsetRootProps) {
|
|
return (
|
|
<BaseFieldset.Root
|
|
className={cn('m-0 min-w-0 border-0 p-0', className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export type FieldsetLegendProps
|
|
= Omit<BaseFieldsetNS.Legend.Props, 'className'>
|
|
& {
|
|
className?: string
|
|
}
|
|
|
|
export function FieldsetLegend({
|
|
className,
|
|
...props
|
|
}: FieldsetLegendProps) {
|
|
return (
|
|
<BaseFieldset.Legend
|
|
className={cn('mb-1 py-1 text-text-secondary system-sm-medium', className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|