Skip to content

Commit f1d625a

Browse files
committed
docs: update examples with new icons and typo fixes
1 parent edbd148 commit f1d625a

File tree

11 files changed

+45
-40
lines changed

11 files changed

+45
-40
lines changed

docs/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class AppComponent {
8484
return ['resizable,scrollbars,status', 'height=' + height, 'width=' + width, 'left=' + left, 'top=' + top].join();
8585
};
8686
// const text = encodeURIComponent('Hey everyone, come & see how good I look!');
87-
const shareUrl = `https://twitter.com/intent/tweet?hashtags=angular&original_referer=http%3A%2F%2Flocalhost%3A4200%2F&ref_src=twsrc%5Etfw&text=Cute%20overlay%20library%20for%20Angular%20-%20tooltips%2C%20modals%2C%20toastr%2C%20menu%2C%20dropdowns%2C%20alerts%2C%20popovers%2C%20sidebar%20and%20more...%20&tw_p=tweetbutton&url=https%3A%2F%2Flokesh-coder.github.io%2Ftoppy%2F&via=lokesh-coder`;
87+
const shareUrl = `https://twitter.com/intent/tweet?hashtags=angular&original_referer=http%3A%2F%2Flocalhost%3A4200%2F&ref_src=twsrc%5Etfw&text=Cute%20overlay%20library%20for%20Angular%20-%20tooltips%2C%20modals%2C%20toastr%2C%20menu%2C%20dropdowns%2C%20alerts%2C%20popovers%2C%20sidebar%20and%20more...%20&tw_p=tweetbutton&url=https%3A%2F%2Flokesh-coder.github.io%2Ftoppy%2F&via=lokesh_coder`;
8888

8989
e.preventDefault();
9090
const win = window.open(shareUrl, 'ShareOnTwitter', getWindowOptions());

docs/app/examples/drag-example/drag-example.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<div class="drag-element-holder">
99
<img
10-
src="./assets/img/fly.png"
10+
src="./assets/icons/icons8-scooter-50.png"
1111
draggable="true"
1212
#el
1313
class="drag-element"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<div class="dropdown-field" #el (click)="open()" [ngClass]="{ open: isOpen }">
2-
<img src="./assets/img/{{ selectedData.icon }}.png" alt="" /> {{ selectedData.name }}
2+
<img src="./assets/icons/{{ selectedData.icon }}.png" alt="" /> {{ selectedData.name }}
33
</div>
44

55
<div class="text-selection" #el2 (click)="open2()">
6-
Do you like it? <span>{{ selectedEatable.name }}</span>
6+
I like <span>{{ selectedEatable.name }}</span>
77
</div>
88

99
<ng-template #tpl let-toppy>
1010
<ul class="dropdown-ist">
1111
<li (click)="select(item)" *ngFor="let item of items" [ngClass]="{ selected: item.name == selectedData.name }">
12-
<img src="./assets/img/{{ item.icon }}.png" alt="" /> {{ item.name }}
12+
<img src="./assets/icons/{{ item.icon }}.png" alt="" /> {{ item.name }}
1313
</li>
1414
</ul>
1515
</ng-template>
@@ -21,7 +21,7 @@
2121
*ngFor="let item of eatables"
2222
[ngClass]="{ selected: item.name == selectedEatable.name }"
2323
>
24-
<img src="./assets/img/{{ item.icon }}.png" alt="" />
24+
<img src="./assets/icons/{{ item.icon }}.png" alt="" />
2525
</li>
2626
</ul>
2727
</ng-template>

docs/app/examples/dropdown-example/dropdown-example.component.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,20 @@ export class DropdownExampleComponent implements OnInit {
1414
private _toppyControl2: ToppyControl;
1515
@ViewChild('tpl', { read: TemplateRef }) tpl: TemplateRef<any>;
1616
@ViewChild('tpl2', { read: TemplateRef }) tpl2: TemplateRef<any>;
17-
items = [{ name: 'Cow', icon: 'cow' }, { name: 'Goat', icon: 'goat' }, { name: 'Snake', icon: 'snake' }];
17+
items = [
18+
{ name: 'Beer', icon: 'icons8-beer-50' },
19+
{ name: 'Coffee', icon: 'icons8-cafe-50' },
20+
{ name: 'Cocktail', icon: 'icons8-cocktail-50' },
21+
{ name: 'Cola', icon: 'icons8-cola-50' },
22+
{ name: 'Tequila', icon: 'icons8-tequila-shot-50' },
23+
{ name: 'Whiskey', icon: 'icons8-whiskey-50' }
24+
];
1825
eatables = [
19-
{ name: 'Nah!', icon: 'one' },
20-
{ name: 'Not so much', icon: 'two' },
21-
{ name: 'Okay', icon: 'three' },
22-
{ name: 'looks good!', icon: 'four' },
23-
{ name: 'Yes, it is cool!!', icon: 'five' }
26+
{ name: 'French fries', icon: 'icons8-french-fries-50' },
27+
{ name: 'Fried chicken', icon: 'icons8-fried-chicken-50' },
28+
{ name: 'Hamburger', icon: 'icons8-hamburger-50' },
29+
{ name: 'Pizza', icon: 'icons8-pizza-50' },
30+
{ name: 'Sandwich', icon: 'icons8-sandwich-50' }
2431
];
2532
selectedData;
2633
selectedEatable;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<div class="drag-element-holder">
2-
<img src="./assets/img/clock.png" #el (mouseenter)="onMouseOver()" (mouseleave)="onMouseLeave()" />
2+
<img src="./assets/icons/icons8-watch-50.png" #el (mouseenter)="onMouseOver()" (mouseleave)="onMouseLeave()" />
33
</div>

docs/app/examples/fullscreen-position-example/fullscreen-position-example.component.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ import { HeroScreenComponent } from '../../host-components/hero-screen/hero-scre
44

55
@Component({
66
selector: 'app-fullscreen-position-example',
7-
templateUrl: './fullscreen-position-example.component.html',
8-
styles: []
7+
templateUrl: './fullscreen-position-example.component.html'
98
})
109
export class FullscreenPositionExampleComponent implements OnInit {
11-
selectedPlacement = null;
1210
private _toppyControl: ToppyControl;
1311
constructor(private toppy: Toppy) {}
1412

@@ -20,13 +18,12 @@ export class FullscreenPositionExampleComponent implements OnInit {
2018
})
2119
.content(HeroScreenComponent)
2220
.create();
21+
this._toppyControl.listen('t_compins').subscribe(d => {
22+
console.log('HeroScreenComponent initiated', d);
23+
});
2324
}
2425

2526
open() {
2627
this._toppyControl.open();
2728
}
28-
29-
onOptionChange() {
30-
console.log('option changed');
31-
}
3229
}

docs/app/examples/global-position-example/global-position-example.component.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ import { SimpleModalComponent } from '../../host-components/simple-modal/simple-
99
styles: [
1010
`
1111
.global-content-wrapper {
12-
background: #ff5722;
12+
background: #e91e63;
1313
padding: 1rem 2rem;
14-
border: 2px solid #c4532f;
14+
border: 2px solid #cc1a57;
1515
border-radius: 3px;
1616
color: #fff;
17-
text-transform: uppercase;
18-
font-weight: 700;
17+
font-weight: 500;
1918
}
2019
`
2120
]
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
<div class="drag-element-holder"><img src="./assets/img/mail.png" class="pointer" #el (click)="open()" /></div>
1+
<div class="drag-element-holder">
2+
<img src="./assets/icons/icons8-comments-50.png" class="pointer" #el (click)="open()" />
3+
</div>
24

3-
<div class="drag-element-holder"><img src="./assets/img/bomb.png" class="pointer" #el2 (click)="openImage()" /></div>
5+
<div class="drag-element-holder">
6+
<img src="./assets/icons/icons8-dynamite-50.png" class="pointer" #el2 (click)="openImage()" />
7+
</div>
48

59
<ng-template #modalTpl let-foo>
610
<div class="modal-container">
7-
<div class="modal-header"><h3 class="m-0">Modal example</h3></div>
8-
<div class="modal-body">
9-
<p>
10-
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Consequuntur assumenda aspernatur, eligendi
11-
dignissimos itaque provident accusantium dolor repellendus maiores quia veniam blanditiis ipsum, perspiciatis
12-
perferendis a ex, quibusdam voluptatibus? Vel.
13-
</p>
11+
<div class="modal-header">Congratulations!</div>
12+
<div class="modal-body text-center">
13+
<div class="illus"><img src="./assets/illus/congrats.svg" alt="" width="90%" /></div>
14+
<div class="mt-4 desc">Wow, You made it!</div>
15+
</div>
16+
<div class="modal-footer text-center pt-0">
17+
<button class="dismiss btn btn-dark btn-lg" (click)="foo.close()">Okay</button>
1418
</div>
15-
<div class="modal-footer"><button class="dismiss btn btn-danger" (click)="foo.close()">Close</button></div>
1619
</div>
1720
</ng-template>
18-
<img src="./assets/img/blast.png" style="display:none;" />
21+
<img src="./assets/icons/icons8-firework-explosion-100.png" style="display:none;" />

docs/app/examples/modal-example/modal-example.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class ModalExampleComponent implements OnInit {
1818
.position(
1919
new GlobalPosition({
2020
placement: InsidePlacement.CENTER,
21-
width: '40%',
21+
width: 300,
2222
height: 'auto'
2323
})
2424
)
@@ -34,15 +34,15 @@ export class ModalExampleComponent implements OnInit {
3434
.position(
3535
new GlobalPosition({
3636
placement: InsidePlacement.CENTER,
37-
width: '25%',
37+
width: 'auto',
3838
height: 'auto'
3939
})
4040
)
4141
.config({
4242
closeOnEsc: true,
4343
closeOnDocClick: true
4444
})
45-
.content('<img src="./assets/img/blast.png" width="100%"/>', { hasHTML: true })
45+
.content('<img src="./assets/icons/icons8-firework-explosion-100.png" width="100%"/>', { hasHTML: true })
4646
.create();
4747
}
4848
open() {

docs/app/host-components/hero-screen/hero-screen.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { Component } from '@angular/core';
77
})
88
export class HeroScreenComponent {
99
close;
10-
constructor() {}
1110
dispose() {
1211
this.close();
1312
}

0 commit comments

Comments
 (0)