Skip to content

Instantly share code, notes, and snippets.

@chrisjensen
Created June 16, 2020 10:01
Show Gist options
  • Save chrisjensen/dff9aae0f9e30a9d2b59ab38e4f28ae8 to your computer and use it in GitHub Desktop.
Save chrisjensen/dff9aae0f9e30a9d2b59ab38e4f28ae8 to your computer and use it in GitHub Desktop.
Expanding Donate Button
const { DonationForm } = RaiselyComponents.Molecules;
const [showDonate, setShowDonate] = useState(false);
return (
<div className="donation-profile__wrapper spotlight-donate">
{showDonate ? (
<DonationForm
profileUuid={profile.uuid}
title={`Donate to ${profile.name}`}
integrations={props.integrations}
global={props.global}
/>
) : (
<div className="donation-profile__button-wrapper">
<Button onClick={() => setShowDonate(true)} theme="secondary">Donate</Button>
</div>
)}
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment