From 7208a08ffb2a26f48f68bf89f6a7562b9c99a957 Mon Sep 17 00:00:00 2001 From: Gabriel De Los Rios Date: Mon, 26 Jan 2026 21:08:14 -0300 Subject: [PATCH] feat: add floating btn --- .../floating-big-btn/floating-big-btn.html | 5 ++++ .../floating-big-btn/floating-big-btn.scss | 22 ++++++++++++++++++ .../floating-big-btn/floating-big-btn.spec.ts | 23 +++++++++++++++++++ .../floating-big-btn/floating-big-btn.ts | 15 ++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 src/app/components/floating-big-btn/floating-big-btn.html create mode 100644 src/app/components/floating-big-btn/floating-big-btn.scss create mode 100644 src/app/components/floating-big-btn/floating-big-btn.spec.ts create mode 100644 src/app/components/floating-big-btn/floating-big-btn.ts diff --git a/src/app/components/floating-big-btn/floating-big-btn.html b/src/app/components/floating-big-btn/floating-big-btn.html new file mode 100644 index 0000000..503ceec --- /dev/null +++ b/src/app/components/floating-big-btn/floating-big-btn.html @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/app/components/floating-big-btn/floating-big-btn.scss b/src/app/components/floating-big-btn/floating-big-btn.scss new file mode 100644 index 0000000..80b0657 --- /dev/null +++ b/src/app/components/floating-big-btn/floating-big-btn.scss @@ -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; + } +} diff --git a/src/app/components/floating-big-btn/floating-big-btn.spec.ts b/src/app/components/floating-big-btn/floating-big-btn.spec.ts new file mode 100644 index 0000000..0b3051e --- /dev/null +++ b/src/app/components/floating-big-btn/floating-big-btn.spec.ts @@ -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; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [FloatingBigBtn] + }) + .compileComponents(); + + fixture = TestBed.createComponent(FloatingBigBtn); + component = fixture.componentInstance; + await fixture.whenStable(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/floating-big-btn/floating-big-btn.ts b/src/app/components/floating-big-btn/floating-big-btn.ts new file mode 100644 index 0000000..4bcd37d --- /dev/null +++ b/src/app/components/floating-big-btn/floating-big-btn.ts @@ -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'); +}