diff --git a/ui/src/clockface/components/form_layout/Form.tsx b/ui/src/clockface/components/form_layout/Form.tsx index de000af7bb..bc07e20978 100644 --- a/ui/src/clockface/components/form_layout/Form.tsx +++ b/ui/src/clockface/components/form_layout/Form.tsx @@ -32,17 +32,9 @@ class Form extends Component { FormFooter, ] - public static ValidChildNames: string = _.map(Form.ValidChildTypes, valid => { - const name = valid.displayName.split('Form').pop() - - return `` - }).join(', ') - public render() { const {children, style} = this.props - this.validateChildren() - return (
{ [`${className}`]: className, }) } - - private validateChildren = (): void => { - const childArray = React.Children.toArray(this.props.children) - const childrenAreValid = _.every(childArray, this.childTypeIsValid) - if (!childrenAreValid) { - // throw new Error( - // ` expected children of type ${Form.ValidChildNames}` - // ) - } - } - - private childTypeIsValid = (child: JSX.Element): boolean => - _.includes(Form.ValidChildTypes, child.type) } export default Form