-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from coinbase/alissa.crane/charges
chore: add modal
- Loading branch information
Showing
12 changed files
with
198 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { CoinbasePaySvg } from 'src/svg/CoinbasePaySvg'; | ||
import type { MockCheckoutButtonReact } from 'src/types'; | ||
|
||
export function MockCheckoutButton({ onClick }: MockCheckoutButtonReact) { | ||
return ( | ||
<div className="w-64"> | ||
<div className="default-dark flex w-full flex-col gap-2"> | ||
<button | ||
type="button" | ||
onClick={onClick} | ||
className="active:ock-bg-secondary-active ock-border-radius ock-font-family flex w-full cursor-pointer items-center justify-center bg-[#0052FF] px-4 py-3 font-semibold leading-normal hover:bg-[#0045D8]" | ||
> | ||
<div className="flex items-center justify-center whitespace-nowrap"> | ||
<div className="mr-2 flex h-5 w-5 shrink-0 items-center justify-center"> | ||
<CoinbasePaySvg /> | ||
</div> | ||
</div> | ||
<span className="ock-font-family font-semibold text-gray-50 leading-normal"> | ||
Pay with Crypto | ||
</span> | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import Image from 'next/image'; | ||
import CommerceScreenImage from '../images/commerceScreen.png'; | ||
import type { OnchainStoreModalReact } from 'src/types'; | ||
import { GITHUB_LINK } from 'src/links'; | ||
import { CloseSvg } from 'src/svg/CloseSvg'; | ||
|
||
export default function OnchainStoreModal({ | ||
closeModal, | ||
}: OnchainStoreModalReact) { | ||
return ( | ||
<div className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50"> | ||
<div className="relative z-10 flex h-full xs:h-auto max-w-lg flex-col gap-2 xs:rounded-[10px] bg-[white] p-6 px-10"> | ||
<button | ||
type="button" | ||
className="absolute top-2 right-4" | ||
onClick={closeModal} | ||
> | ||
<CloseSvg /> | ||
</button> | ||
<div className="flex flex-col items-start gap-2 pt-4 pb-4"> | ||
<div className="font-bold">Try it locally</div> | ||
<span className="text-sm "> | ||
<a href={GITHUB_LINK} className="ock-text-primary"> | ||
Fork the template and experience the end-to-end checkout flow.{' '} | ||
</a> | ||
Your users will see the below screen when the payment flow is | ||
active. | ||
</span> | ||
<div className="mx-auto flex grow justify-center py-4"> | ||
<Image | ||
src={CommerceScreenImage} | ||
alt="123" | ||
className="mx-auto h-[400px] w-auto rounded-[10px]" | ||
/> | ||
</div> | ||
<div className="ock-text-foreground-muted text-xs "> | ||
These products are not for sale. We have disabled the end-to-end | ||
checkout flow on production. | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export function CloseSvg() { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
strokeWidth={1.5} | ||
stroke="currentColor" | ||
className="size-6" | ||
> | ||
<title>CloseSvg</title> | ||
<path | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
d="M6 18 18 6M6 6l12 12" | ||
/> | ||
</svg> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export function CoinbasePaySvg() { | ||
return ( | ||
<svg | ||
role="img" | ||
aria-label="ock-coinbasePaySvg" | ||
width="100%" | ||
height="100%" | ||
viewBox="0 0 20 20" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<title>CoinbasePaySvg</title> | ||
<path | ||
fillRule="evenodd" | ||
clipRule="evenodd" | ||
d="M10.0145 14.1666C7.82346 14.1666 6.04878 12.302 6.04878 9.99996C6.04878 7.69788 7.82346 5.83329 10.0145 5.83329C11.9776 5.83329 13.6069 7.33677 13.9208 9.30552H17.9163C17.5793 5.02774 14.172 1.66663 10.0145 1.66663C5.63568 1.66663 2.08301 5.39926 2.08301 9.99996C2.08301 14.6007 5.63568 18.3333 10.0145 18.3333C14.172 18.3333 17.5793 14.9722 17.9163 10.6944H13.9208C13.6069 12.6632 11.9776 14.1666 10.0145 14.1666Z" | ||
fill="#f9fafb" | ||
/> | ||
</svg> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters