mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
add spinner to button
This commit is contained in:
@@ -3,6 +3,7 @@ import Contact from './contact'
|
||||
import BookProvider, { BookContext } from '../../context/book'
|
||||
import DateSelect from './dateSelect'
|
||||
import Reason from './reason'
|
||||
import Button from '../button'
|
||||
|
||||
function BookForm() {
|
||||
const { onSubmit, state, forgetData } = useContext(BookContext)
|
||||
@@ -32,9 +33,9 @@ function BookForm() {
|
||||
)}
|
||||
<Contact />
|
||||
<div className="flex items-end">
|
||||
<button type="submit" disabled={postData} className="btn btn-blue">
|
||||
<Button type="submit" loading={!!postData} disabled={postData}>
|
||||
{postData ? 'Speichern...' : 'Absenden'}
|
||||
</button>
|
||||
</Button>
|
||||
{postDataError && (
|
||||
<div className="error-message flex-grow">{postDataError}</div>
|
||||
)}
|
||||
@@ -50,4 +51,4 @@ export default function Book() {
|
||||
<BookForm />
|
||||
</BookProvider>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user