Skip to content

Commit 3f73721

Browse files
committed
fix: style fixes ✨
1 parent aeafd7d commit 3f73721

File tree

4 files changed

+33
-1
lines changed

4 files changed

+33
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "MIT",
55
"scripts": {
66
"ng": "ng",
7-
"start": "ng serve",
7+
"start": "ng serve --host 0.0.0.0 --disable-host-check",
88
"build": "ng build --prod --base-href \"https://nglibrary.github.io/ngx-choosy-documentation/\"",
99
"test-app": "ng test",
1010
"test": "echo \"No test specified\" && exit 0",

src/app/app.component.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#box {
2+
text-align: center;
3+
}

src/app/app.component.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export class AppComponent {
2727
es5IsOpen = false;
2828
fthr = f;
2929
menu = [];
30+
31+
buttonMenu: any = [];
3032
ngOnInit() {
3133
this.addresses = addresses;
3234
this.colors = colors;
@@ -44,6 +46,14 @@ export class AppComponent {
4446
{ name: 'Changelog' }
4547
];
4648

49+
this.buttonMenu = [
50+
{ name: 'Dashboard', icon: 'cogs' },
51+
{ name: 'Account', icon: 'user-circle-o' },
52+
{ name: 'Messages', icon: 'envelope-open' },
53+
{ name: 'Language', icon: 'globe' },
54+
{ name: 'Logout', icon: 'sign-out' }
55+
];
56+
4757
}
4858
ngAfterViewInit() {
4959

src/app/app.test.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<div id="box">
2+
<button type="button" class="btn" choosyButtonSelect [options]="buttonMenu" [itemTemplate]="oneListItemTpl" [selectedItemTemplate]="oneSelectedItemTpl">Menu</button>
3+
</div>
4+
5+
<button type="button" class="btn" choosyButtonSelect [options]="['a','b']">list</button>
6+
7+
8+
<ng-template #oneListItemTpl let-item>
9+
<div>
10+
<i class="fa fa-{{item.icon}}"></i>
11+
<span>{{item.name}}</span>
12+
</div>
13+
</ng-template>
14+
15+
<ng-template #oneSelectedItemTpl let-item>
16+
<div>
17+
<span>{{item.name}}</span>
18+
</div>
19+
</ng-template>

0 commit comments

Comments
 (0)