implement mat card for categories for consistency
This commit is contained in:
parent
1d1a7893e8
commit
f71dd5b315
4 changed files with 20 additions and 36 deletions
|
|
@ -24,5 +24,5 @@
|
|||
.expense-list {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
justify-content: stretch;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
<div class="categories-container">
|
||||
<div class="category-list-header">
|
||||
<p>Categories</p>
|
||||
<app-divider />
|
||||
</div>
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Categories</mat-card-title>
|
||||
</mat-card-header>
|
||||
|
||||
<div class="category-list">
|
||||
<mat-card-content>
|
||||
@for (category of categories(); track category.id) {
|
||||
<div>{{ category.name }}</div>
|
||||
{{ category.name }}
|
||||
}
|
||||
@if (!categories().length) {
|
||||
<div class="category-list-empty">
|
||||
No categories to display
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,28 +1,13 @@
|
|||
.categories-container {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
@use "variables";
|
||||
|
||||
.category-list-header {
|
||||
padding-top: 1rem;
|
||||
.categories-container {
|
||||
padding-top: 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
p {
|
||||
font-size: 1.8rem;
|
||||
line-height: 100%;
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
app-divider {
|
||||
mat-card {
|
||||
max-width: variables.$wide-screen;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.category-list {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { Component, computed } from '@angular/core';
|
||||
import { CategoryService } from '../../../services/category.service';
|
||||
import { DividerComponent } from '../../divider/divider.component';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
|
||||
@Component({
|
||||
selector: 'app-categories',
|
||||
imports: [
|
||||
DividerComponent,
|
||||
MatCardModule
|
||||
],
|
||||
templateUrl: './categories.component.html',
|
||||
styleUrl: './categories.component.scss'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue