feat: add email field component with styling and basic functionality
This commit is contained in:
parent
d2a7f0d30b
commit
da38676847
@ -0,0 +1,17 @@
|
||||
input {
|
||||
background-color: rgba(132, 129, 122, 1.0);
|
||||
border: none;
|
||||
font-size: 1.2em;
|
||||
line-height: 2.5em;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
color: var(--primary-text-color);
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline-color: var(--primary-background-color);
|
||||
outline-width: 100px;
|
||||
/*outline-offset: 1px;*/
|
||||
/*outline-style: auto;*/
|
||||
}
|
@ -0,0 +1 @@
|
||||
<input type="email" [value]="value ? value : ''"/>
|
@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { EmailFieldComponent } from './email-field.component';
|
||||
|
||||
describe('EmailFieldComponent', () => {
|
||||
let component: EmailFieldComponent;
|
||||
let fixture: ComponentFixture<EmailFieldComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [EmailFieldComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(EmailFieldComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,12 @@
|
||||
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'atomic-email-field',
|
||||
imports: [],
|
||||
templateUrl: './email-field.component.html',
|
||||
styleUrl: './email-field.component.css'
|
||||
})
|
||||
export class EmailFieldComponent {
|
||||
@Input() value?: string;
|
||||
@Output() valueChange = new EventEmitter<string>();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user