Skip to content
View jhamyle823's full-sized avatar
Block or Report

Block or report jhamyle823

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
jhamyle823/README.md

"ewin"; import { useState } from "react";

export default function Page() { const [noCount, setNoCount] = useState(0); const [yesPressed, setYesPressed] = useState(false); const yesButtonSize = noCount * 20 + 16;

const handleNoClick = () => { setNoCount(noCount + 1); };

const getNoButtonText = () => { const phrases = [ "No", "Are you sure?", "Really sure?", "Think again!", "Last chance!", "Surely not?", "You might regret this!", "Give it another thought!", "Are you absolutely certain?", "This could be a mistake!", "Have a heart!", "Don't be so cold!", "Change of heart?", "Wouldn't you reconsider?", "Is that your final answer?", "You're breaking my heart ;(", ];

return phrases[Math.min(noCount, phrases.length - 1)];

};

return (

{yesPressed ? ( <>
Ok yay!!!
</> ) : ( <>

Will you be my Valentine?

<button className={bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded mr-4} style={{ fontSize: yesButtonSize }} onClick={() => setYesPressed(true)} > Yes {noCount === 0 ? "No" : getNoButtonText()}
</> )}
); }

Popular repositories

  1. jhamyle823 jhamyle823 Public

    Config files for my GitHub profile.

  2. create-react-app create-react-app Public

    Forked from facebook/create-react-app

    Set up a modern web app by running one command.

    JavaScript