This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial creation of input-field. (#288)
- Loading branch information
1 parent
07e2f63
commit 7d9c9df
Showing
7 changed files
with
68 additions
and
1 deletion.
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
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
1 change: 1 addition & 0 deletions
1
src/core/components/inputs/text-input/text-input.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 @@ | ||
<input type="text" placeholder="test" (change)="onChange.emit()"> |
5 changes: 5 additions & 0 deletions
5
src/core/components/inputs/text-input/text-input.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,5 @@ | ||
@import "src/global-styles/_theme-colors.scss"; | ||
|
||
input { | ||
border: $primary-default | ||
} |
25 changes: 25 additions & 0 deletions
25
src/core/components/inputs/text-input/text-input.component.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,25 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { TextInputComponent } from './text-input.component'; | ||
|
||
describe('TextInputComponent', () => { | ||
let component: TextInputComponent; | ||
let fixture: ComponentFixture<TextInputComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ TextInputComponent ] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(TextInputComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
12 changes: 12 additions & 0 deletions
12
src/core/components/inputs/text-input/text-input.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, EventEmitter, Output} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'design-text-input', | ||
templateUrl: './text-input.component.html', | ||
styleUrls: ['./text-input.component.scss'] | ||
}) | ||
export class TextInputComponent { | ||
|
||
// eslint-disable-next-line @angular-eslint/no-output-on-prefix | ||
@Output() public onChange = new EventEmitter<InputEvent>(); | ||
} |
18 changes: 18 additions & 0 deletions
18
src/core/components/inputs/text-input/text-input.module.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,18 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { TextInputComponent } from './text-input.component'; | ||
|
||
|
||
|
||
@NgModule({ | ||
declarations: [ | ||
TextInputComponent | ||
], | ||
imports: [ | ||
CommonModule | ||
], | ||
exports: [ | ||
TextInputComponent | ||
] | ||
}) | ||
export class TextInputModule { } |