@dpouris/gswap 0.0.15 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/README.md +8 -6
  2. package/package.json +1 -1
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dpouris/gswap",
3
- "version": "0.0.15",
3
+ "version": "0.1.0",
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",