Make BookingPage and ConfirmedBookingPage responsive

This commit is contained in:
Henry Hiles 2023-08-17 19:49:08 -04:00
parent e4f6a04c95
commit 500707844a
7 changed files with 40 additions and 22 deletions

View file

@ -11,6 +11,13 @@
--secondary-1: #edefee; --secondary-1: #edefee;
} }
#root {
display: flex;
flex-direction: column;
height: 100vh;
justify-content: space-between;
}
body { body {
margin: 0; margin: 0;
} }

View file

@ -8,6 +8,7 @@ export const BookingPage = ({
reservationError reservationError
}) => ( }) => (
<section className="booking"> <section className="booking">
<div className="booking-container">
<h1>Book a Table</h1> <h1>Book a Table</h1>
<hr /> <hr />
<BookingForm <BookingForm
@ -16,5 +17,6 @@ export const BookingPage = ({
submitForm={submitForm} submitForm={submitForm}
reservationError={reservationError} reservationError={reservationError}
/> />
</div>
</section> </section>
) )

View file

@ -4,7 +4,8 @@ import "../styles/ConfirmedBookingPage.css"
export const ConfirmedBookingPage = () => ( export const ConfirmedBookingPage = () => (
<article className="confirmed"> <article className="confirmed">
<h1>Booking Confirmed</h1> <h1>Booking Confirmed</h1>
<p>Your booking has been confirmed.</p> <p>
<Link to="/">Back to home</Link> Your booking has been confirmed. <Link to="/">Back to home</Link>
</p>
</article> </article>
) )

View file

@ -2,7 +2,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 0.2rem; gap: 0.2rem;
min-width: 20rem;
} }
.booking-form :is(label, .submit) { .booking-form :is(label, .submit) {
@ -18,6 +17,7 @@
} }
.booking-form .submit { .booking-form .submit {
margin-top: 1.8rem;
background-color: #fbdabb; background-color: #fbdabb;
} }

View file

@ -1,13 +1,16 @@
.booking { .booking-container {
display: flex; display: flex;
flex-direction: column;
align-items: center;
background-color: #495e57;
padding: 1rem;
border-radius: 1rem;
gap: 1rem;
width: 70%;
margin: auto; margin: auto;
flex-direction: column;
background-color: var(--primary-1);
padding: 1.8rem;
border-radius: 1rem;
max-width: 50rem;
}
.booking {
width: 100%;
padding: 1rem;
} }
.booking h1 { .booking h1 {

View file

@ -1,7 +1,12 @@
.confirmed { .confirmed {
background-color: var(--primary-1); background-color: var(--primary-1);
border-radius: 2rem; border-radius: 2rem;
margin: auto; margin: 2rem;
padding: 2rem 3rem; padding: 2rem 1rem;
text-align: center; text-align: center;
} }
.confirmed h1 {
font-size: 2rem;
margin: 0;
}

View file

@ -4,7 +4,7 @@
} }
.specials { .specials {
margin: 1rem; margin: auto;
} }
.specials h2 { .specials h2 {