Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 37e5729

Browse files
committed
Fixed merge conflicts
1 parent 1d3d789 commit 37e5729

File tree

8 files changed

+61
-43
lines changed

8 files changed

+61
-43
lines changed

src/app/design/styled-button/styled-button.component.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/app/design/styled-button/styled-button.component.spec.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/app/design/styled-button/styled-button.component.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<button (click)="onClick.emit($event)" [class]="flavor" [disabled]="disabled">
2+
<ng-content></ng-content>
3+
</button>

src/app/design/styled-button/styled-button.component.scss renamed to src/core/components/button/button.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ button {
3737
border: none;
3838
font-size: 16px;
3939
margin-right: 10px;
40+
4041
&:last-child {
4142
margin-right: 0;
4243
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {ComponentFixture, TestBed} from '@angular/core/testing';
2+
import {ButtonComponent} from './button.component';
3+
4+
describe('ButtonComponent', () => {
5+
let component: ButtonComponent;
6+
let fixture: ComponentFixture<ButtonComponent>;
7+
8+
beforeEach(async () => {
9+
await TestBed.configureTestingModule({
10+
declarations: [ButtonComponent]
11+
}).compileComponents();
12+
});
13+
14+
beforeEach(() => {
15+
fixture = TestBed.createComponent(ButtonComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import {Component, EventEmitter, Input, Output} from '@angular/core';
2+
3+
export type ButtonFlavor = 'primary' | 'success' | 'warning' | 'danger' | 'info';
4+
5+
@Component({
6+
selector: 'app-button',
7+
templateUrl: './button.component.html',
8+
styleUrls: ['./button.component.scss']
9+
})
10+
export class ButtonComponent {
11+
12+
@Input() public disabled = false;
13+
@Input() public flavor: ButtonFlavor = 'primary';
14+
15+
// eslint-disable-next-line @angular-eslint/no-output-on-prefix
16+
@Output() public onClick = new EventEmitter<MouseEvent>();
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import {NgModule} from '@angular/core';
2+
import {CommonModule} from '@angular/common';
3+
import {ButtonComponent} from './button.component';
4+
5+
@NgModule({
6+
declarations: [
7+
ButtonComponent
8+
],
9+
exports: [
10+
ButtonComponent
11+
],
12+
imports: [
13+
CommonModule
14+
]
15+
})
16+
export class ButtonModule {
17+
}

0 commit comments

Comments
 (0)