# react-cartgallery

> react-cartgallery React component

Latest version **2.0.4** (published 2019-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-cartgallery
pnpm add react-cartgallery
yarn add react-cartgallery
bun add react-cartgallery
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.4 |
| Published | 2019-11-01 |
| First published | 2019-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 334.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | VitYell |
| Maintainers | vittyell |

## Links

- npm: https://www.npmjs.com/package/react-cartgallery
- Repository: https://github.com/VitYell/react-cartgallery
- Homepage: https://github.com/VitYell/react-cartgallery#readme
- Issues: https://github.com/VitYell/react-cartgallery/issues
- npm.io page: https://npm.io/package/react-cartgallery

## Dependencies (4)

- [uniqid](https://npm.io/package/uniqid.md) ^5.0.3
- [lg-zoom](https://npm.io/package/lg-zoom.md) ^1.1.0
- [lodash.debounce](https://npm.io/package/lodash.debounce.md) ^4.0.8
- [material-design-icons](https://npm.io/package/material-design-icons.md) ^3.0.1

## Recent versions

- 2.0.4 (latest) — 2019-11-01
- 2.0.3 — 2019-09-22
- 2.0.2 — 2019-09-21
- 2.0.1 — 2019-09-21
- 2.0.0 — 2019-09-21
- 1.10.3 — 2019-08-30
- 1.10.1 — 2019-08-24
- 1.10.0 — 2019-08-24
- 1.9.1 — 2019-06-30
- 1.9.0 — 2019-05-23
- 1.8.0 — 2019-05-23
- 1.7.0 — 2019-05-22
- 1.6.0 — 2019-05-17
- 1.5.0 — 2019-04-21
- 1.4.0 — 2019-04-21
- … 4 more at https://npm.io/package/react-cartgallery/versions

## README

# 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
```js
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: "&#8352;" }}
      changeCartHandler={ newCart => console.log(newCart) }
    >
      { cart.map( (item, key) => (
        <CartgalleryItem key={key} group="cart" {...item}>
          <img src={ item.src } />
        </CartgalleryItem>
      )) }
    </CartgalleryProvider>
  </div>
);
```

---
_Source: https://npm.io/package/react-cartgallery · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
