feat: add floating btn

This commit is contained in:
2026-01-26 21:08:14 -03:00
parent 85da313957
commit 7208a08ffb
4 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
<mat-toolbar>
<button matIconButton>
<mat-icon>{{icon()}}</mat-icon>
</button>
</mat-toolbar>

View 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;
}
}

View 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();
});
});

View 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');
}