-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
2,636 additions
and
2,596 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
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ import { linkTo } from '@storybook/addon-links' | |
|
||
Assuming you already have a Commerce Layer account ([sign up](https://dashboard.commercelayer.io/sign_up) if you don't — it's free!) and your organization properly set up and filled with real or sample data (check our [onboarding documentation](https://docs.commercelayer.io/core/welcome) for more information about that), you can get easily started with Commerce Layer `drop-in.js` in two simple steps: | ||
|
||
1. Import the library from the [CDN](https://cdn.jsdelivr.net/npm/@commercelayer/[email protected].1/dist/drop-in/drop-in.esm.js). | ||
1. Import the library from the [CDN](https://cdn.jsdelivr.net/npm/@commercelayer/[email protected].2/dist/drop-in/drop-in.esm.js). | ||
2. Declare a global variable called `commercelayerConfig` and set the following attributes. | ||
|
||
| Attribute | Type | Required | Description | | ||
|
@@ -22,7 +22,7 @@ Assuming you already have a Commerce Layer account ([sign up](https://dashboard. | |
The final result should be similar to the code snippet below: | ||
|
||
```html dark | ||
<script type="module" src="https://cdn.jsdelivr.net/npm/@commercelayer/[email protected].1/dist/drop-in/drop-in.esm.js"></script> | ||
<script type="module" src="https://cdn.jsdelivr.net/npm/@commercelayer/[email protected].2/dist/drop-in/drop-in.esm.js"></script> | ||
<script> | ||
(function() { | ||
|
@@ -44,15 +44,15 @@ Assuming you already have a Commerce Layer account ([sign up](https://dashboard. | |
The drop-in library is shipped unstyled, so that you can apply your own styles. We provide some simple styling. If you're happy with that or you just want to speed up the set up process just add an additional `link` tag to your HTML code as follows: | ||
|
||
```html dark | ||
<link href="https://cdn.jsdelivr.net/npm/@commercelayer/[email protected].1/dist/drop-in/drop-in.css" rel="stylesheet" /> | ||
<link href="https://cdn.jsdelivr.net/npm/@commercelayer/[email protected].2/dist/drop-in/drop-in.css" rel="stylesheet" /> | ||
``` | ||
|
||
### `minicart.css` | ||
|
||
The [**minicart**](?path=/docs/components-cart-cl-cart--minicart) version of the cart is unstyled and hidden by default. Since its behavior is achieved mostly via CSS, you have to write your own to style it. You can start from scratch, or import a minimal set of styles and take it from there. To do that, just add an additional `link` tag to your HTML code as follows: | ||
|
||
```html dark | ||
<link href="https://cdn.jsdelivr.net/npm/@commercelayer/[email protected].1/dist/drop-in/minicart.css" rel="stylesheet" /> | ||
<link href="https://cdn.jsdelivr.net/npm/@commercelayer/[email protected].2/dist/drop-in/minicart.css" rel="stylesheet" /> | ||
``` | ||
|
||
|
||
|
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
Oops, something went wrong.