import React from 'react'; import { Col } from '../Col'; import { Row } from '../Row'; export interface IFormGroup { as?: React.ReactNode; className?: string; children: any; id?: string; inline?: boolean; xs?: number | string; sm?: number | string; md?: number | string; lg?: number | string; xl?: number | string; hide?: string | boolean; [x: string]: any; } export const FormGroup: React.FC = (props) => { const { as, children, className = '', id, inline, xs, sm, md, lg, xl, hide, ...otherProps } = props; if (as === Col) { return ( {children} ); } else if (as === Row) { return ( {children} ); } else { return (
{children}
); } };