import React from 'react'; import { HelpTextExpandedContext } from '../../../help'; import type { IFormInputValidation } from '../inputs'; import type { ILayoutProps } from './interface'; import { ValidationMessage } from '../validation'; import '../forms.less'; export function ResponsiveFieldLayout(props: ILayoutProps) { const { label, help, input, actions, validation = {} as IFormInputValidation } = props; const { hidden, messageNode, category } = validation; const showLabel = !!label || !!help; const helpUnder = false; return (
{showLabel && (
{label} {!helpUnder && help}
)}
{input} {actions}
{helpUnder && help &&
{help}
} {!hidden && }
); }