magic-grid
Advanced tools
Comparing version 3.0.8 to 3.0.9
{ | ||
"name": "magic-grid", | ||
"version": "3.0.8", | ||
"version": "3.0.9", | ||
"description": "Super lightweight javascript library for dynamic grid layouts.", | ||
@@ -5,0 +5,0 @@ "main": "dist/magic-grid.cjs.js", |
@@ -7,3 +7,3 @@ [![MIT License](https://img.shields.io/npm/l/magic-grid.svg?style=for-the-badge)](https://www.npmjs.com/package/magic-grid) | ||
Creating a dynamic grid layout has never been easier. With Magic Grid, all you have to do is specify a container and listen for changes. A few other configuration options are available for convenience but it's all very simple. You can read about the implementaion details [on Codeburst](https://codeburst.io/magic-grid-f8e2221e7cef). | ||
Creating a dynamic grid layout has never been easier. With Magic Grid, all you have to do is specify a container and listen for changes. A few other configuration options are available for convenience but it's all very simple. Check it out live [on JSFIDDLE](https://jsfiddle.net/eolaojo/4pov0rdf/). You can read about the implementaion details [on Codeburst](https://codeburst.io/magic-grid-f8e2221e7cef). | ||
@@ -18,3 +18,3 @@ **Note: Every item in the grid must have the same width** | ||
### Getting Started: | ||
### Getting Started | ||
#### Step 1 | ||
@@ -34,6 +34,4 @@ | ||
import MagicGrid from "magic-grid" | ||
``` | ||
or | ||
```javascript | ||
// or | ||
let MagicGrid = require("magic-grid"); | ||
@@ -45,10 +43,16 @@ ``` | ||
CDN | ||
```html | ||
<script src="node_modules/magic-grid/dist/magic-grid.cjs.js"> | ||
<script src="https://unpkg.com/magic-grid/dist/magic-grid.cjs.js"></script> | ||
<!-- or (minified) --> | ||
<script src="https://unpkg.com/magic-grid/dist/magic-grid.min.js"></script> | ||
``` | ||
or (minified) | ||
NPM | ||
```html | ||
<script src="node_modules/magic-grid/dist/magic-grid.cjs.js"></script> | ||
```html | ||
<script src="node_modules/magic-grid/dist/magic-grid.min.js"> | ||
<!-- or (minified) --> | ||
<script src="node_modules/magic-grid/dist/magic-grid.min.js"></script> | ||
``` | ||
@@ -66,4 +70,4 @@ | ||
### Usage: | ||
#### Static content | ||
### Usage | ||
#### Static content: | ||
If your container doesn't have any dynamically loaded content i.e., all its child elements are always in the DOM, you should initialize the grid this way: | ||
@@ -80,3 +84,3 @@ ```javascript | ||
#### Dynamic content | ||
#### Dynamic content: | ||
If the container relies on data from an api, or experiences a delay, for whatever reason, before it can render its content in the DOM, you need to let the grid know the number of items to expect: | ||
@@ -83,0 +87,0 @@ ```javascript |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25278
145