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

Commit

Permalink
Fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Mar 14, 2022
1 parent 1d3d789 commit 37e5729
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 43 deletions.
1 change: 0 additions & 1 deletion src/app/design/styled-button/styled-button.component.html

This file was deleted.

25 changes: 0 additions & 25 deletions src/app/design/styled-button/styled-button.component.spec.ts

This file was deleted.

17 changes: 0 additions & 17 deletions src/app/design/styled-button/styled-button.component.ts

This file was deleted.

3 changes: 3 additions & 0 deletions src/core/components/button/button.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<button (click)="onClick.emit($event)" [class]="flavor" [disabled]="disabled">
<ng-content></ng-content>
</button>
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ button {
border: none;
font-size: 16px;
margin-right: 10px;

&:last-child {
margin-right: 0;
}
Expand Down
23 changes: 23 additions & 0 deletions src/core/components/button/button.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {ButtonComponent} from './button.component';

describe('ButtonComponent', () => {
let component: ButtonComponent;
let fixture: ComponentFixture<ButtonComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ButtonComponent]
}).compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(ButtonComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
17 changes: 17 additions & 0 deletions src/core/components/button/button.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {Component, EventEmitter, Input, Output} from '@angular/core';

export type ButtonFlavor = 'primary' | 'success' | 'warning' | 'danger' | 'info';

@Component({
selector: 'app-button',
templateUrl: './button.component.html',
styleUrls: ['./button.component.scss']
})
export class ButtonComponent {

@Input() public disabled = false;
@Input() public flavor: ButtonFlavor = 'primary';

// eslint-disable-next-line @angular-eslint/no-output-on-prefix
@Output() public onClick = new EventEmitter<MouseEvent>();
}
17 changes: 17 additions & 0 deletions src/core/components/button/button.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {ButtonComponent} from './button.component';

@NgModule({
declarations: [
ButtonComponent
],
exports: [
ButtonComponent
],
imports: [
CommonModule
]
})
export class ButtonModule {
}

0 comments on commit 37e5729

Please sign in to comment.