Hello, {{ title }}
-Congratulations! Your app is running. 🎉
-Congratulations! Your app is running. 🎉
-{{ content.abstract }}
diff --git a/src/app/book/book-card/book-card.component.scss b/src/app/book/book-card/book-card.component.scss new file mode 100644 index 0000000..503889e --- /dev/null +++ b/src/app/book/book-card/book-card.component.scss @@ -0,0 +1,14 @@ +:host { + display: inline-block; + border-radius: 2px; + margin: 1rem; + padding: 1rem; + width: 300px; + + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); + + &:hover { + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); + } +} diff --git a/src/app/book/book-card/book-card.component.ts b/src/app/book/book-card/book-card.component.ts new file mode 100644 index 0000000..552738c --- /dev/null +++ b/src/app/book/book-card/book-card.component.ts @@ -0,0 +1,24 @@ +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { Book } from '../book'; + +@Component({ + selector: 'app-book-card', + standalone: true, + imports: [], + templateUrl: './book-card.component.html', + styleUrl: './book-card.component.scss' +}) +export class BookCardComponent { + customStyle = { color: '#064D9E', fontWeight: 600 }; + + @Input({ required: true }) content!: Book; + @Output() detailClick = new EventEmitter+ {{ book.abstract }} + {{ book.author }} +
+ +