@dpouris/gswap 0.0.14 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,11 +2,13 @@
2
2
 
3
3
  ### Create a gallery of images with ease.
4
4
 
5
+ ![img](./gswap.gif)
6
+
5
7
  ---
6
8
 
7
9
  To get started, in your project folder, run:
8
10
 
9
- ```
11
+ ```bash
10
12
  npm i @dpouris/gswap
11
13
  ```
12
14
 
@@ -14,12 +16,12 @@ npm i @dpouris/gswap
14
16
 
15
17
  First, import the library and create a new gswap instance:
16
18
 
17
- ```
19
+ ```js
18
20
  import { GSwap } from '@dpouris/gswap';
19
21
 
20
22
  ...
21
23
 
22
- const = document.getElementById("gallery")
24
+ const galleryContainer = document.getElementById("gallery")
23
25
 
24
26
  const gswap = new GSwap({
25
27
  containerElem: galleryContainer,
@@ -116,7 +118,7 @@ This will create a new instance of gswap and will place the gallery absolutely i
116
118
  Displays the next image in the gallery.
117
119
  You can call the **next()** method by calling it from the gallery instance like so.
118
120
 
119
- ```
121
+ ```js
120
122
  const gallery = new GSwap(...);
121
123
 
122
124
  ...
@@ -128,7 +130,7 @@ OR
128
130
 
129
131
  You can bind the **next()** method to an onclick event like so.
130
132
 
131
- ```
133
+ ```js
132
134
  const gallery = new GSwap(...);
133
135
  const nextBtn = document.getElementById('nextGalleryBtn')
134
136
 
@@ -149,7 +151,7 @@ Stacks the images in the gallery in case their position was altered.
149
151
 
150
152
  Can be called from the gallery instance like so.
151
153
 
152
- ```
154
+ ```js
153
155
  const gallery = new GSwap(...);
154
156
 
155
157
  ...
package/gswap.gif ADDED
Binary file
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@dpouris/gswap",
3
- "version": "0.0.14",
3
+ "version": "0.1.1",
4
4
  "description": "A library for swapping between images in a gallery",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
7
7
  "files": [
8
8
  "README.md",
9
+ "gswap.gif",
9
10
  "dist/"
10
11
  ],
11
12
  "directories": {
package/dist/src/1.jpg DELETED
Binary file
package/dist/src/2.jpg DELETED
Binary file
package/dist/src/3.webp DELETED
Binary file