import { forwardRef, type HTMLAttributes, type PropsWithChildren, type ReactNode } from 'react'; import styles from './ConfigSection.module.scss'; interface ConfigSectionProps extends Omit, 'title'> { title: ReactNode; description?: ReactNode; indexLabel?: ReactNode; icon?: ReactNode; } export const ConfigSection = forwardRef>( function ConfigSection( { title, description, indexLabel, icon, className, children, ...rest }, ref ) { const sectionClassName = [styles.section, className].filter(Boolean).join(' '); return ( {indexLabel ? {indexLabel} : null} {icon ? {icon} : null} {title} {description ? {description} : null} {children} ); } );
{description}