From 828da9a35540c281be783f5abf70bbe9aed64cb6 Mon Sep 17 00:00:00 2001 From: cami Date: Mon, 21 Jun 2021 02:11:44 +0200 Subject: [PATCH] Added a custom link to the button --- frontend/src/components/Button.js | 6 +++++- frontend/src/components/HeroSection.js | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Button.js b/frontend/src/components/Button.js index a5c2335..ef4ff43 100644 --- a/frontend/src/components/Button.js +++ b/frontend/src/components/Button.js @@ -2,6 +2,8 @@ import React from "react"; import "./Button.css"; import { Link } from "react-router-dom"; +const newTo = (props) => '#'; + const STYLES = ["btn--primary", "btn--outline"]; const SIZES = ["btn--medium", "btn--large"]; @@ -11,6 +13,7 @@ export const Button = ({ onClick, buttonStyle, buttonSize, + newTo, }) => { const checkButtonStyle = STYLES.includes(buttonStyle) ? buttonStyle @@ -18,8 +21,9 @@ export const Button = ({ const checkButtonSize = SIZES.includes(buttonSize) ? buttonSize : SIZES[0]; + return ( - +