diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 32f5334c..3225a46f 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -5,18 +5,21 @@ import React from 'react'; interface ButtonProps { children: React.ReactNode; colour: string; - href: string; + href?: string; } const Button = ({ children, colour, href }: ButtonProps) => { + const isAnchor = !!href; + const Component = isAnchor ? 'a' : 'button'; + return ( - {children} - + ); };