From 52dc86f9673062fa107f9e7f155f6235135389a7 Mon Sep 17 00:00:00 2001 From: "mwendwagracie@gmail.com" Date: Fri, 3 Mar 2023 15:16:26 +0300 Subject: [PATCH] Build a button component using bootstrap #7 --- src/components/Button.js | 21 +++++++++ src/components/footer.js | 3 +- src/components/navbar.js | 7 +-- src/containers/FootballClub/index.js | 17 ++++---- src/containers/HomeScreen/featured.js | 6 ++- src/containers/HomeScreen/gallery.js | 9 ++-- src/containers/HomeScreen/top-section.js | 3 +- src/containers/LoginScreen/index.js | 22 +++++----- src/containers/SignupSoftware/index.js | 10 ++++- src/containers/SoftwareScreen/index.js | 43 ++++++++++--------- .../Sports/components/upcoming-events.js | 11 ++--- src/containers/Sports/index.js | 5 ++- 12 files changed, 99 insertions(+), 58 deletions(-) create mode 100644 src/components/Button.js diff --git a/src/components/Button.js b/src/components/Button.js new file mode 100644 index 0000000..1400c9d --- /dev/null +++ b/src/components/Button.js @@ -0,0 +1,21 @@ +import React from 'react' +import { Link } from 'react-router-dom'; + +const Button = (props) => { + switch (props.btnType) { + case 'success': + return (); + case 'success-as-link': + return ({props.children}) + default: + return (); + } +}; + +export default Button diff --git a/src/components/footer.js b/src/components/footer.js index aeed9d3..c9f1bd1 100644 --- a/src/components/footer.js +++ b/src/components/footer.js @@ -1,6 +1,7 @@ import React from 'react' import { Link } from 'react-router-dom' import { BsLinkedin, BsTwitter, BsFacebook } from "react-icons/bs"; +import Button from './Button'; const Footer = () => { @@ -73,7 +74,7 @@ const Footer = () => {
- +
diff --git a/src/components/navbar.js b/src/components/navbar.js index 71b076d..427c4ec 100644 --- a/src/components/navbar.js +++ b/src/components/navbar.js @@ -1,6 +1,7 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { images } from '../assets'; +import Button from './Button'; const NavBar = () => { @@ -8,9 +9,9 @@ const NavBar = () => {