import React, {Component} from 'react'; import {ValidatorForm} from 'react-material-ui-form-validator'; import {Typography, Box, TextField} from '@material-ui/core'; import SaveIcon from '@material-ui/icons/Save'; import {ENDPOINT_ROOT} from '../api'; import { restController, RestControllerProps, RestFormLoader, FormActions, FormButton, SectionContent, } from '../components'; import {SettingsState} from './types'; export const LIGHT_SETTINGS_ENDPOINT = ENDPOINT_ROOT + "settings"; type LightStateRestControllerProps = RestControllerProps; class SettingsController extends Component { componentDidMount() { this.props.loadData(); } render() { return ( { const {data, saveData, handleValueChange} = props; return ( Die unten eingegebenen Werte werden nach klick des 'SAVE' Buttons übernommen und überleben einen Neustart.
} variant="contained" color="primary" type="submit">Save
) }} />
) } } export default restController(LIGHT_SETTINGS_ENDPOINT, SettingsController);