import React from 'react'; import { TextValidator, ValidatorForm } from 'react-material-ui-form-validator'; import { Checkbox } from '@material-ui/core'; import SaveIcon from '@material-ui/icons/Save'; import { RestFormProps, BlockFormControlLabel, PasswordValidator, FormButton, FormActions } from '../components'; import { isIP, isHostname, or } from '../validators'; import { OTASettings } from './types'; type OTASettingsFormProps = RestFormProps; class OTASettingsForm extends React.Component { componentDidMount() { ValidatorForm.addValidationRule('isIPOrHostname', or(isIP, isHostname)); } render() { const { data, handleValueChange, saveData } = this.props; return ( } label="Enable OTA Updates" /> } variant="contained" color="primary" type="submit" > Save ); } } export default OTASettingsForm;