feat: add floating btn
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
<mat-toolbar>
|
||||
<button matIconButton>
|
||||
<mat-icon>{{icon()}}</mat-icon>
|
||||
</button>
|
||||
</mat-toolbar>
|
||||
22
src/app/components/floating-big-btn/floating-big-btn.scss
Normal file
22
src/app/components/floating-big-btn/floating-big-btn.scss
Normal file
@@ -0,0 +1,22 @@
|
||||
mat-toolbar {
|
||||
position: absolute;
|
||||
bottom: 80px;
|
||||
left: 75%;
|
||||
display: block;
|
||||
|
||||
button {
|
||||
background: var(--mat-sys-primary-container);
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
mat-icon {
|
||||
font-size: 48px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
mat-icon {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
23
src/app/components/floating-big-btn/floating-big-btn.spec.ts
Normal file
23
src/app/components/floating-big-btn/floating-big-btn.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FloatingBigBtn } from './floating-big-btn';
|
||||
|
||||
describe('FloatingBigBtn', () => {
|
||||
let component: FloatingBigBtn;
|
||||
let fixture: ComponentFixture<FloatingBigBtn>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [FloatingBigBtn]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(FloatingBigBtn);
|
||||
component = fixture.componentInstance;
|
||||
await fixture.whenStable();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
15
src/app/components/floating-big-btn/floating-big-btn.ts
Normal file
15
src/app/components/floating-big-btn/floating-big-btn.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Component, input, output } from '@angular/core';
|
||||
import { MatIconButton } from '@angular/material/button';
|
||||
import { MatIcon } from '@angular/material/icon';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
|
||||
@Component({
|
||||
selector: 'app-floating-big-btn',
|
||||
imports: [MatToolbarModule, MatIcon, MatIconButton],
|
||||
templateUrl: './floating-big-btn.html',
|
||||
styleUrl: './floating-big-btn.scss',
|
||||
})
|
||||
export class FloatingBigBtn {
|
||||
readonly bigClick = output();
|
||||
readonly icon = input('add');
|
||||
}
|
||||
Reference in New Issue
Block a user