Skip to content

Commit 0b24605

Browse files
Merge pull request #83 from Gauravdarkslayer/v0.2.1
V0.2.1
2 parents 18b32ff + 3515036 commit 0b24605

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ An Angular component to render instagram like stories.
55
[![npm downloads](https://img.shields.io/npm/dt/ngx-stories)](https://www.npmjs.com/package/ngx-stories)
66
[![npm version](https://img.shields.io/npm/v/ngx-stories)](https://www.npmjs.com/package/ngx-stories)
77

8+
## Screenshot
9+
![Story Screenshot](./assets/images/story-screenshot.png)
10+
811

912
## For Version 17+
1013

@@ -29,19 +32,17 @@ import { NgxStoriesComponent, StoryGroup } from 'ngx-stories';
2932
export class AppComponent {
3033
storyGroups: StoryGroup[] = [
3134
{
32-
id: 1,
3335
name: 'John Doe',
3436
stories: [
35-
{ id: 101, type: 'image', content: 'https://example.com/story1.jpg' },
36-
{ id: 101, type: 'component', content: CustomComponent }, // pass any angular component to render in stories
37+
{ type: 'image', content: 'https://example.com/story1.jpg' },
38+
{ type: 'component', content: CustomComponent }, // pass any angular component to render in stories
3739
],
3840
},
3941
{
40-
id: 2,
4142
name: 'Jane Smith',
4243
stories: [
43-
{ id: 103, type: 'image', content: 'https://example.com/story3.jpg' },
44-
{ id: 3, type: 'video', content: 'https://example.com/video-story.mp4' },
44+
{ type: 'image', content: 'https://example.com/story3.jpg' },
45+
{ type: 'video', content: 'https://example.com/video-story.mp4' },
4546
],
4647
},
4748
];
@@ -61,6 +62,7 @@ export class AppComponent {
6162
| `triggerOnExit` | `EventEmitter<void>` | No | Output event that is triggered when the user manually exits the story view. |
6263
| `triggerOnSwipeUp` | `EventEmitter<void>` | No | Output event that is triggered when the user performs a swipe-up gesture, typically for additional actions. |
6364
| `onStoryGroupChange` | `EventEmitter<number>` | No | Output event that is triggered when the user changes the storyGroup.
65+
| `triggerOnStoryChange` | `EventEmitter<object>` | No | Output event that is triggered when the user changes the story.
6466

6567

6668
```ts
@@ -84,6 +86,7 @@ interface NgxStoriesOptions {
8486
* Loading: A Loading svg will be shown when story buffers (SVG from <a href="https://www.svgbackgrounds.com/elements/animated-svg-preloaders/">Animated SVG Preloaders by SVGBackgrounds.com</a>)
8587
* Audio controls: Toggle audio on/off for stories that have audio.
8688
* Component based stories for best control.
89+
* Auto-assigning unique ids to storyGroups and stories.
8790

8891
## Contributing
8992
[Contributing Guide](https://github.com/Gauravdarkslayer/ngx-stories/blob/main/CONTRIBUTING.md)

assets/images/story-screenshot.png

127 KB
Loading

projects/ngx-stories/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,17 @@ import { NgxStoriesComponent, StoryGroup } from 'ngx-stories';
2929
export class AppComponent {
3030
storyGroups: StoryGroup[] = [
3131
{
32-
id: 1,
3332
name: 'John Doe',
3433
stories: [
35-
{ id: 101, type: 'image', content: 'https://example.com/story1.jpg' },
36-
{ id: 101, type: 'component', content: CustomComponent }, // pass any angular component to render in stories
34+
{ type: 'image', content: 'https://example.com/story1.jpg' },
35+
{ type: 'component', content: CustomComponent }, // pass any angular component to render in stories
3736
],
3837
},
3938
{
40-
id: 2,
4139
name: 'Jane Smith',
4240
stories: [
43-
{ id: 103, type: 'image', content: 'https://example.com/story3.jpg' },
44-
{ id: 3, type: 'video', content: 'https://example.com/video-story.mp4' },
41+
{ type: 'image', content: 'https://example.com/story3.jpg' },
42+
{ type: 'video', content: 'https://example.com/video-story.mp4' },
4543
],
4644
},
4745
];
@@ -61,6 +59,7 @@ export class AppComponent {
6159
| `triggerOnExit` | `EventEmitter<void>` | No | Output event that is triggered when the user manually exits the story view. |
6260
| `triggerOnSwipeUp` | `EventEmitter<void>` | No | Output event that is triggered when the user performs a swipe-up gesture, typically for additional actions. |
6361
| `onStoryGroupChange` | `EventEmitter<number>` | No | Output event that is triggered when the user changes the storyGroup.
62+
| `triggerOnStoryChange` | `EventEmitter<object>` | No | Output event that is triggered when the user changes the story.
6463

6564

6665
```ts
@@ -84,6 +83,7 @@ interface NgxStoriesOptions {
8483
* Loading: A Loading svg will be shown when story buffers (SVG from <a href="https://www.svgbackgrounds.com/elements/animated-svg-preloaders/">Animated SVG Preloaders by SVGBackgrounds.com</a>)
8584
* Audio controls: Toggle audio on/off for stories that have audio.
8685
* Component based stories for best control.
86+
* Auto-assigning unique ids to storyGroups and stories.
8787

8888
## Contributing
8989
[Contributing Guide](https://github.com/Gauravdarkslayer/ngx-stories/blob/main/CONTRIBUTING.md)

projects/ngx-stories/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-stories",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"peerDependencies": {
55
"@angular/common": "^18.2.0",
66
"@angular/core": "^18.2.0",

0 commit comments

Comments
 (0)