From 0f7b7ddb1a0cd8dc29e6610eaa45cbb98481306a Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Mon, 26 Dec 2022 00:00:09 +0100 Subject: [PATCH] add spinner to button --- components/book/index.tsx | 7 ++++--- components/button.tsx | 13 +++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 components/button.tsx diff --git a/components/book/index.tsx b/components/book/index.tsx index 6498d3d..b14d4e4 100644 --- a/components/book/index.tsx +++ b/components/book/index.tsx @@ -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() { )}
- + {postDataError && (
{postDataError}
)} @@ -50,4 +51,4 @@ export default function Book() { ) -} +} \ No newline at end of file diff --git a/components/button.tsx b/components/button.tsx new file mode 100644 index 0000000..e203940 --- /dev/null +++ b/components/button.tsx @@ -0,0 +1,13 @@ +const Button = ({ children, loading = false, ...rest }) => { + return (); +} + +export default Button; \ No newline at end of file