Skip to content

Commit

Permalink
Rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
kashz committed May 25, 2021
1 parent 1b874ab commit 279eb2b
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 22 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# ngx-photo-gallery
# ngx-expanded-photo-gallery

PhotoGallery library for Angular based on [PhotoSwipe](http://photoswipe.com/).

## Installation

Install from npm:

```
npm install --save @twogate/ngx-photo-gallery
npm install --save @twogate/ngx-expanded-photo-gallery
```

Add PhotoGalleryModule to NgModule imports:

```ts
import { PhotoGalleryModule } from '@twogate/ngx-photo-gallery'
import { PhotoGalleryModule } from '@twogate/ngx-expanded-photo-gallery'

@NgModule({
...
Expand All @@ -21,8 +23,9 @@ import { PhotoGalleryModule } from '@twogate/ngx-photo-gallery'
```

with options ([PhotoSwipeOptions](https://photoswipe.com/documentation/options.html)):

```ts
import { PhotoGalleryModule } from '@twogate/ngx-photo-gallery'
import { PhotoGalleryModule } from '@twogate/ngx-expanded-photo-gallery'

@NgModule({
...
Expand All @@ -39,6 +42,7 @@ import { PhotoGalleryModule } from '@twogate/ngx-photo-gallery'
## Usage

simple use:

```html
<div class="images" photoGalleryGroup>
<div class="images-item" [photoGallery]="image1.originUrl">
Expand All @@ -54,6 +58,7 @@ simple use:
```

with options ([PhotoSwipeOptions](https://photoswipe.com/documentation/options.html)):

```html
<div class="products" [photoGalleryGroup]="{ arrowEl: true, indexIndicatorSep: ' - ' }">
<div class="products-item">
Expand All @@ -72,21 +77,20 @@ with options ([PhotoSwipeOptions](https://photoswipe.com/documentation/options.h
```

on Ionic project:

```html
<div
class="images"
photoGalleryGroup
(onPhotoGalleryInit)="setSwipeBackEnabled(false)"
(onPhotoGalleryDestroy)="setSwipeBackEnabled(true)"
>
<div class="images-item"
*ngFor="let image of images"
[photoGallery]="image.originUrl"
>
<div class="images-item" *ngFor="let image of images" [photoGallery]="image.originUrl">
<img [src]="image.thumbnailUrl" />
</div>
</div>
```

```ts
import { Component, Input } from '@angular/core'
import { NavController } from 'ionic-angular'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ngx-photo-gallery",
"name": "ngx-expanded-photo-gallery",
"version": "0.0.0",
"scripts": {
"ng": "ng",
Expand Down
20 changes: 12 additions & 8 deletions projects/core/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# ngx-photo-gallery
# ngx-expanded-photo-gallery

PhotoGallery library for Angular based on [PhotoSwipe](http://photoswipe.com/).

## Installation

Install from npm:

```
npm install --save @twogate/ngx-photo-gallery
npm install --save @twogate/ngx-expanded-photo-gallery
```

Add PhotoGalleryModule to NgModule imports:

```ts
import { PhotoGalleryModule } from '@twogate/ngx-photo-gallery'
import { PhotoGalleryModule } from '@twogate/ngx-expanded-photo-gallery'

@NgModule({
...
Expand All @@ -21,8 +23,9 @@ import { PhotoGalleryModule } from '@twogate/ngx-photo-gallery'
```

with options ([PhotoSwipeOptions](https://photoswipe.com/documentation/options.html)):

```ts
import { PhotoGalleryModule } from '@twogate/ngx-photo-gallery'
import { PhotoGalleryModule } from '@twogate/ngx-expanded-photo-gallery'

@NgModule({
...
Expand All @@ -39,6 +42,7 @@ import { PhotoGalleryModule } from '@twogate/ngx-photo-gallery'
## Usage

simple use:

```html
<div class="images" photoGalleryGroup>
<div class="images-item" [photoGallery]="image1.originUrl">
Expand All @@ -54,6 +58,7 @@ simple use:
```

with options ([PhotoSwipeOptions](https://photoswipe.com/documentation/options.html)):

```html
<div class="products" [photoGalleryGroup]="{ arrowEl: true, indexIndicatorSep: ' - ' }">
<div class="products-item">
Expand All @@ -72,21 +77,20 @@ with options ([PhotoSwipeOptions](https://photoswipe.com/documentation/options.h
```

on Ionic project:

```html
<div
class="images"
photoGalleryGroup
(onPhotoGalleryInit)="setSwipeBackEnabled(false)"
(onPhotoGalleryDestroy)="setSwipeBackEnabled(true)"
>
<div class="images-item"
*ngFor="let image of images"
[photoGallery]="image.originUrl"
>
<div class="images-item" *ngFor="let image of images" [photoGallery]="image.originUrl">
<img [src]="image.thumbnailUrl" />
</div>
</div>
```

```ts
import { Component, Input } from '@angular/core'
import { NavController } from 'ionic-angular'
Expand Down
6 changes: 3 additions & 3 deletions projects/core/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@twogate/ngx-photo-gallery",
"version": "1.0.3",
"name": "@twogate/ngx-expanded-photo-gallery",
"version": "1.0.0",
"license": "MIT",
"repository": "https://github.com/twogate/ngx-photo-gallery",
"repository": "https://github.com/twogate/ngx-expanded-photo-gallery",
"keywords": [
"angular",
"ng",
Expand Down
2 changes: 1 addition & 1 deletion projects/demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { PhotoGalleryModule } from '@twogate/ngx-photo-gallery';
import { PhotoGalleryModule } from '@twogate/ngx-expanded-photo-gallery';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dom"
],
"paths": {
"@twogate/ngx-photo-gallery": ["dist/core"]
"@twogate/ngx-expanded-photo-gallery": ["dist/core"]
}
}
}

0 comments on commit 279eb2b

Please sign in to comment.