import React from 'react'; import { Spinner } from '../../../widgets/spinners/Spinner'; export interface IConfigSectionFooterProps { isDirty: boolean; isValid: boolean; isSaving: boolean; saveError: boolean; onRevertClicked: () => void; onSaveClicked: () => void; } export class ConfigSectionFooter extends React.Component { public render() { const { isValid, isDirty, isSaving, saveError, onRevertClicked, onSaveClicked } = this.props; if (!isDirty) { return (
In sync with server
); } const saveButton = ( ); const savingButton = ( ); return (
{isSaving ? savingButton : saveButton} {!!saveError && (
There was an error saving your changes. Please try again.
)}
); } }