2.0.4 • Published 5 years ago
react-cartgallery v2.0.4
About
React component with the implementation of the ability to mark photos (add-in-cart, like-mark).
Based on lightgallery.js: https://sachinchoolur.github.io/lightgallery.js
#Installation
npm install react-cartgallery
#Usage
import React from 'react';
import {CartgalleryProvider, CartgalleryItem} from 'cart-gallery';
import "cart-gallery/es/css/cartgallery.css";
import i01 from "./images/i01.jpg";
import i02 from "./images/i02.jpg";
import i03 from "./images/i03.jpg";
let cart = [
{ idx: "001", inCart: true, price: 100, src: i01 },
{ idx: "002", inCart: false, price: 250, src: i02 },
{ idx: "003", inCart: false, price: 500, src: i03 },
]
export default () => (
<div className="demo-container">
<h1>React-cartgallery Demo</h1>
<CartgalleryProvider
cartGallerySettings={{ currency: "₠" }}
changeCartHandler={ newCart => console.log(newCart) }
>
{ cart.map( (item, key) => (
<CartgalleryItem key={key} group="cart" {...item}>
<img src={ item.src } />
</CartgalleryItem>
)) }
</CartgalleryProvider>
</div>
);
2.0.4
5 years ago
2.0.3
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.10.3
5 years ago
1.10.1
5 years ago
1.10.0
5 years ago
1.9.1
5 years ago
1.9.0
5 years ago
1.8.0
5 years ago
1.7.0
5 years ago
1.6.0
5 years ago
1.5.0
5 years ago
1.4.0
5 years ago
1.3.0
5 years ago
1.2.0
5 years ago
1.1.0
5 years ago
1.0.0
5 years ago