diff --git a/pages/index.tsx b/pages/index.tsx index f3bffe087..d6a740b0c 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -22,6 +22,7 @@ interface RatingForkProps { iconBgColor: string btnBgColor: string btnTextColor: string + btnHoverColor:string btnText: string } @@ -51,9 +52,16 @@ const RatingForkComponent: React.FC = ({ iconBgColor, btnBgColor, btnTextColor, + btnHoverColor, btnText, }) => { const iconStyle = { backgroundColor: iconBgColor } + const [hovered, setHovered] = useState(false) + const buttonStyle = { + backgroundColor: hovered ? btnHoverColor : btnBgColor, + color: btnTextColor, + transition: 'background-color 0.3s ease-in-out, color 0.3s ease-in-out', + } return (
= ({
@@ -244,6 +254,7 @@ export default function Home() { bgColor="#575448" iconBgColor="#FBD449" btnBgColor="#FBD449" + btnHoverColor="#FFF455" btnTextColor="black" btnText="Give a star" /> @@ -255,6 +266,7 @@ export default function Home() { bgColor="#403B56" iconBgColor="#714EFF" btnBgColor="#714EFF" + btnHoverColor="#7E8EF1" btnTextColor="white" btnText="Contribute now" />