add error notification next to send button

This commit is contained in:
Thomas Ruoff
2020-09-14 23:25:18 +02:00
parent c081640eaa
commit 9a0bf11749
2 changed files with 10 additions and 1 deletions

View File

@@ -73,11 +73,15 @@ function WizardInternal() {
<DateSelect /> <DateSelect />
<Reason /> <Reason />
<Contact /> <Contact />
<div>{postDataError}</div>
<div> <div>
<button type="submit" disabled={postData} className="btn btn-blue"> <button type="submit" disabled={postData} className="btn btn-blue">
{postData ? 'Speichern...' : 'Absenden'} {postData ? 'Speichern...' : 'Absenden'}
</button> </button>
{postDataError && (
<div className="error-message">
<strong>Error:</strong> {postDataError}
</div>
)}
</div> </div>
</form> </form>
</> </>

View File

@@ -111,6 +111,11 @@
@apply text-blue-700; @apply text-blue-700;
} }
.error-message {
@apply inline-block bg-red-200 border-solid border-2 border-red-700 rounded text-red-700 py-1 px-2;
max-width: 10rem;
}
.Calendar-grid { .Calendar-grid {
@apply flex flex-wrap; @apply flex flex-wrap;
} }