diff options
Diffstat (limited to 'ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button')
4 files changed, 64 insertions, 0 deletions
diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.css b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.css new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.css diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.html new file mode 100644 index 00000000..fd44ac1a --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.html @@ -0,0 +1,3 @@ +<p> + rdp-icon-button works! +</p> diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.spec.ts new file mode 100644 index 00000000..56520293 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpIconButtonComponent } from './rdp-icon-button.component'; + +describe('RdpIconButtonComponent', () => { + let component: RdpIconButtonComponent; + let fixture: ComponentFixture<RdpIconButtonComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpIconButtonComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpIconButtonComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.ts new file mode 100644 index 00000000..225f739d --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.ts @@ -0,0 +1,36 @@ +import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core'; + +@Component({ + selector: 'rdp-icon-button', + styleUrls: ['./rdp-icon-button.component.css'], + template: ` + <button type="button" class="btn btn-primary" (click)="emitClickEvent()" [disabled]="isDisabled"> + <i class="{{icon}}"></i> + {{text}} + </button> +` +}) +export class RdpIconButtonComponent implements OnInit { + + @Output() rdpClick = new EventEmitter<any>(); + @Input() isDisabled:boolean = false; + @Input() text = "Button Name"; + @Input() icon : string; + + + constructor() { } + + ngOnInit() { + } + + emitClickEvent(){ + this.rdpClick.emit(); + } + +// Example usage: ( Needs Testing: ) +// ================================== +// <rdp-button [text]="'SUBMIT'" (rdpClick)="editMyFiles(Object)" [icon]="'icon ion-md-person-add'" [isDisabled]=true></rdp-button> +// Note: Ensure the text and icon strings are enslosed in this formt : "' <<YOUR TEXT>> '" + + +} |