-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update landing page * edits * update examples * fix example * format * Update packages/react/docs/staticPages/hook.example.jsx Co-authored-by: Anthony Frehner <[email protected]> * Update packages/react/docs/staticPages/hydrogenReact.doc.ts --------- Co-authored-by: Anthony Frehner <[email protected]>
- Loading branch information
1 parent
2e7c3af
commit d35dc8b
Showing
7 changed files
with
49 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {ShopPayButton} from '@shopify/hydrogen-react'; | ||
|
||
export function MyProduct({variantId}) { | ||
return <ShopPayButton variantIds={[variantId]} />; | ||
} |
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
import {useMoney} from '@shopify/hydrogen-react'; | ||
|
||
export function MyComponent() { | ||
const {currencyCode, currencySymbol, amount} = useMoney(variant.pricev2); | ||
|
||
return ( | ||
<div> | ||
<strong>{currencyCode}</strong> | ||
<span>{currencySymbol}</span> | ||
<span>{amount}</span> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
npm i --save @shopify/storefront-kit-react | ||
npm i --save @shopify/hydrogen-react |
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 |
---|---|---|
@@ -1 +1 @@ | ||
yarn add @shopify/storefront-kit-react | ||
yarn add @shopify/hydrogen-react |
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,12 @@ | ||
import {flattenConnection, MediaFile} from '@shopify/hydrogen-react'; | ||
|
||
export function Product({product}) { | ||
const media = flattenConnection(product.media); | ||
return ( | ||
<> | ||
{media.map((mediaFile) => { | ||
return <MediaFile data={mediaFile} key={mediaFile.id} />; | ||
})} | ||
</> | ||
); | ||
} |