Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(select): Add select with groups sample; Add padding-top to samples
- Loading branch information
1 parent
af9b144
commit 5b2c603
Showing
10 changed files
with
92 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...ates/angular/igx-ts/select/select-groups/files/src/app/__path__/__name__.comonent.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { async, TestBed, ComponentFixture } from "@angular/core/testing"; | ||
import { NoopAnimationsModule } from "@angular/platform-browser/animations"; | ||
import { $(ClassName)Component } from "./$(filePrefix).component"; | ||
import { IgxSelectModule, IgxDropDownModule } from "igniteui-angular"; | ||
|
||
describe("$(ClassName)Component", () => { | ||
let component: $(ClassName)Component; | ||
let fixture: ComponentFixture<$(ClassName)Component>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [$(ClassName)Component], | ||
imports: [ IgxSelectModule, NoopAnimationsModule, IgxDropDownModule ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent($(ClassName)Component); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
13 changes: 13 additions & 0 deletions
13
templates/angular/igx-ts/select/select-groups/files/src/app/__path__/__name__.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="select-wrapper"> | ||
<igx-select #select> | ||
<label igxLabel>Select With Groups</label> | ||
<igx-select-item-group *ngFor="let item of items" [label]="item.type"> | ||
<igx-select-item *ngFor="let fruit of item.fruits" [value]="fruit"> | ||
{{fruit}} | ||
</igx-select-item> | ||
<igx-select-item *ngFor="let vegetable of item.vegetables" [value]="vegetable"> | ||
{{vegetable}} | ||
</igx-select-item> | ||
</igx-select-item-group> | ||
</igx-select> | ||
</div> |
3 changes: 3 additions & 0 deletions
3
templates/angular/igx-ts/select/select-groups/files/src/app/__path__/__name__.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.select-wrapper { | ||
padding-top: 50ox | ||
} |
12 changes: 12 additions & 0 deletions
12
templates/angular/igx-ts/select/select-groups/files/src/app/__path__/__name__.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Component } from "@angular/core"; | ||
@Component({ | ||
selector: "app-$(filePrefix)", | ||
styleUrls: ["$(filePrefix).component.scss"], | ||
templateUrl: "$(filePrefix).component.html" | ||
}) | ||
export class $(ClassName)Component { | ||
public items: any[] = [ | ||
{ type: "Fruits", fruits: [ "Apple", "Orange", "Banana" ] }, | ||
{ type: "Vegetables", vegetables: [ "Cucumber", "Potato", "Pepper" ] } | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { IgniteUIForAngularTemplate } from "../../../../../lib/templates/IgniteUIForAngularTemplate"; | ||
|
||
class IgxSelectTemplate extends IgniteUIForAngularTemplate { | ||
constructor() { | ||
super(__dirname); | ||
this.components = ["Select With Groups"]; | ||
this.controlGroup = "Grids & Lists"; | ||
this.listInComponentTemplates = true; | ||
this.id = "select-groups"; | ||
this.projectType = "igx-ts"; | ||
this.name = "Select With Groups"; | ||
this.description = "IgxSelect that has groups"; | ||
this.dependencies = [{ | ||
import: [ | ||
"IgxSelectModule", "IgxDropDownModule", "IgxFilterModule", | ||
"IgxButtonModule", "IgxToggleModule" | ||
], | ||
from: "igniteui-angular" | ||
}]; | ||
} | ||
} | ||
module.exports = new IgxSelectTemplate(); |
14 changes: 8 additions & 6 deletions
14
templates/angular/igx-ts/select/simple-select/files/src/app/__path__/__name__.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
<igx-select #select> | ||
<label igxLabel>Simple Select</label> | ||
<igx-select-item *ngFor="let item of items" [value]="item"> | ||
{{item}} | ||
</igx-select-item> | ||
</igx-select> | ||
<div class="select-wrapper"> | ||
<igx-select #select> | ||
<label igxLabel>Simple Select</label> | ||
<igx-select-item *ngFor="let item of items" [value]="item"> | ||
{{item}} | ||
</igx-select-item> | ||
</igx-select> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.select-wrapper { | ||
padding-top: 50px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters