Restaurant Site Project with GatsbyJS-6

Photo by Angelo Pantazis on Unsplash

Welcome to part-6 of the series. You can find part-5 here.

We will start creating Banner component in this part. This component will show the different text, which is displayed inside each picture for each page.

So, create a new file Banner.js inside the utils folder and put the below content in it. This component is quite similar to the Header component, we had created in previous part. We are taking three props — title, subtitle and children and displaying it by a styled-component BannerWrapper.

We are also having a default props for title, if not passed from the parent component.

Banner.js

Rest of the chapter is exclusive content and will be in my upcoming book Gatsby Cookbook. You can find more details about it here.

Gatsby Cookbook

Now, our Menu page will show the menu text.

Menu page

This completes part-6 of the series. You can find part-7 here.

You can find the code for the project in this github repo.

--

--

--

Founder TWD, JavaScript & ReactJS Trainer, Youtuber, Blogger

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

All about React

Frontend Developer Love — Eindhoven review

Step by step: Building and publishing an NPM Typescript package.

Async Action handling in Javascript

Using Papa Parse to do that thing you definitely shouldn’t do.

JS30 Challenge Day 04 — Array Cardio

List of buttons with text detailing the results of array methods for each dataset

Callback Functions

Javascript Functions 101

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nabendu Biswas

Nabendu Biswas

Founder TWD, JavaScript & ReactJS Trainer, Youtuber, Blogger

More from Medium

How To Set Up React With Tailwind CSS

React App with Final Space API — Tinder Style

Containerize React.js Application With Node.js

Benefits and Drawbacks of REST APIs