button icons
This commit is contained in:
@@ -4,13 +4,13 @@ input {
|
||||
font-size: 16px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-bottom: 1px solid #888;
|
||||
color: #888;
|
||||
transition: all 300ms ease-in-out;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-bottom: 2px solid @primary-color;
|
||||
margin-bottom: -1px;
|
||||
border-bottom: 1px solid @primary-color;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 500px) {
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<button mat-button>
|
||||
<span *ngIf="icon"><fa-icon [icon]="icon"></fa-icon><span class="content"> </span></span>
|
||||
<span class="content">
|
||||
<ng-content></ng-content>
|
||||
</span>
|
||||
</button>
|
||||
@@ -0,0 +1,12 @@
|
||||
button {
|
||||
color: #373b44;
|
||||
@media screen and (max-width: 860px) {
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
@media screen and (max-width: 860px) {
|
||||
display: none ;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
|
||||
import {ButtonComponent} from './button.component';
|
||||
|
||||
describe('ButtonComponent', () => {
|
||||
let component: ButtonComponent;
|
||||
let fixture: ComponentFixture<ButtonComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ButtonComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ButtonComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
12
src/app/widget-modules/components/button/button.component.ts
Normal file
12
src/app/widget-modules/components/button/button.component.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {IconProp} from '@fortawesome/fontawesome-svg-core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-button',
|
||||
templateUrl: './button.component.html',
|
||||
styleUrls: ['./button.component.less']
|
||||
})
|
||||
export class ButtonComponent {
|
||||
@Input() icon: IconProp;
|
||||
|
||||
}
|
||||
20
src/app/widget-modules/components/button/button.module.ts
Normal file
20
src/app/widget-modules/components/button/button.module.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {ButtonComponent} from './button.component';
|
||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [ButtonComponent],
|
||||
exports: [
|
||||
ButtonComponent
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
FontAwesomeModule,
|
||||
MatButtonModule
|
||||
]
|
||||
})
|
||||
export class ButtonModule {
|
||||
}
|
||||
Reference in New Issue
Block a user