feat: action btn
This commit is contained in:
3
src/app/components/action-btn/action-btn.html
Normal file
3
src/app/components/action-btn/action-btn.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="action-btn">
|
||||
<button matButton="outlined" [disabled]="disabled()">{{text()}}</button>
|
||||
</div>
|
||||
12
src/app/components/action-btn/action-btn.scss
Normal file
12
src/app/components/action-btn/action-btn.scss
Normal file
@@ -0,0 +1,12 @@
|
||||
:host {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
padding: 24px 0;
|
||||
width: 100%;
|
||||
button {
|
||||
width: 100%;
|
||||
pointer-events: all;
|
||||
}
|
||||
}
|
||||
23
src/app/components/action-btn/action-btn.spec.ts
Normal file
23
src/app/components/action-btn/action-btn.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ActionBtn } from './action-btn';
|
||||
|
||||
describe('ActionBtn', () => {
|
||||
let component: ActionBtn;
|
||||
let fixture: ComponentFixture<ActionBtn>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [ActionBtn]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ActionBtn);
|
||||
component = fixture.componentInstance;
|
||||
await fixture.whenStable();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
13
src/app/components/action-btn/action-btn.ts
Normal file
13
src/app/components/action-btn/action-btn.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Component, input } from '@angular/core';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
selector: 'app-action-btn',
|
||||
imports: [MatButton],
|
||||
templateUrl: './action-btn.html',
|
||||
styleUrl: './action-btn.scss',
|
||||
})
|
||||
export class ActionBtn {
|
||||
disabled = input<boolean>(true);
|
||||
text = input('');
|
||||
}
|
||||
Reference in New Issue
Block a user