diff --git a/src/app/app.module.ts b/src/app/app.module.ts index fa00bdd..9024416 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,4 +1,5 @@ import { BrowserModule } from '@angular/platform-browser'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { NgModule } from '@angular/core'; import { AppRoutingModule } from './app-routing.module'; import { HttpClientModule } from '@angular/common/http'; @@ -20,6 +21,7 @@ import { SharedModule } from './modules/shared/shared.module'; ], imports: [ BrowserModule, + BrowserAnimationsModule, AppRoutingModule, HttpClientModule, FormsModule, diff --git a/src/app/modules/carrito/carrito.component.html b/src/app/modules/carrito/carrito.component.html index 3281bf8..01bf8fe 100644 --- a/src/app/modules/carrito/carrito.component.html +++ b/src/app/modules/carrito/carrito.component.html @@ -13,7 +13,7 @@ -
No hay artÃculos en el carrito
@@ -21,7 +21,8 @@{{articulo.DetArt}} diff --git a/src/app/modules/shared/shared.module.ts b/src/app/modules/shared/shared.module.ts index 0f743ca..004ffec 100644 --- a/src/app/modules/shared/shared.module.ts +++ b/src/app/modules/shared/shared.module.ts @@ -1,12 +1,16 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; import { ArticuloService } from 'src/app/services/articulo/articulo.service'; +import { CategoriaService } from 'src/app/services/categoria/categoria.service'; @NgModule({}) export class SharedModule { static forRoot(): ModuleWithProviders { return { ngModule: SharedModule, - providers: [ArticuloService] + providers: [ + ArticuloService, + CategoriaService + ] }; } } diff --git a/src/scss/scroll.scss b/src/scss/scroll.scss new file mode 100644 index 0000000..631d24a --- /dev/null +++ b/src/scss/scroll.scss @@ -0,0 +1,44 @@ +@import "node_modules/bootstrap/scss/variables"; + +.scroll-y { + overflow-y: auto; + scrollbar-width: none; + &::-webkit-scrollbar { + display: none; + } +} + +.scroll-y-visible { + overflow-y: auto; + &::-webkit-scrollbar { + width: 0.75em; + } + &::-webkit-scrollbar-track { + border-radius: 10px; + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4); + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4); + background-color: $white; + } + &::-webkit-scrollbar-thumb { + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.7); + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.7); + outline: 1px solid slategrey; + border-radius: 10px; + height: 12px; + &:active { + box-shadow: inset 0 0 8px $primary; + -webkit-box-shadow: inset 0 0 8px $primary; + } + } + &::-webkit-scrollbar-corner { + border-radius: 10px; + } +} + +.scroll-x { + overflow-x: auto; + scrollbar-width: none; + &::-webkit-scrollbar { + display: none; + } +} diff --git a/src/styles.scss b/src/styles.scss index 78b4bc9..235d635 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -3,6 +3,7 @@ @import "scss/height-width.scss"; @import "scss/animations.scss"; @import "scss/icons.scss"; +@import "scss/scroll.scss"; @import "node_modules/bootstrap/scss/_variables.scss"; @font-face { @@ -65,19 +66,3 @@ p { .rotate-180-neg { transform: rotate(-180deg); } - -.scroll-y { - overflow-y: auto; - scrollbar-width: none; - &::-webkit-scrollbar { - display: none; - } -} - -.scroll-x { - overflow-x: auto; - scrollbar-width: none; - &::-webkit-scrollbar { - display: none; - } -}