Homepage components

This commit is contained in:
Brad Traversy
2024-07-09 10:33:14 -04:00
parent 1d7f6f4959
commit 7e070a12d0
5 changed files with 155 additions and 4 deletions
+21
View File
@@ -0,0 +1,21 @@
const InfoBox = ({
heading,
backgroundColor = 'bg-gray-100',
textColor = 'text-gray-800',
buttonInfo,
children,
}) => {
return (
<div className={`${backgroundColor} p-6 rounded-lg shadow-md`}>
<h2 className={`${textColor} text-2xl font-bold`}>{heading}</h2>
<p className={`${textColor} mt-2 mb-4`}>{children}</p>
<a
href={buttonInfo.link}
className={`inline-block ${buttonInfo.backgroundColor} text-white rounded-lg px-4 py-2 hover:opacity-80`}
>
{buttonInfo.text}
</a>
</div>
);
};
export default InfoBox;