Wrapping up code duplication

This commit is contained in:
Mosab Ibrahim
2020-05-05 23:35:26 +02:00
parent ce90e59c00
commit ee2f36a0f6
10 changed files with 174 additions and 356 deletions

View File

@@ -29,7 +29,7 @@
<div class="w-full max-w-5xl mx-auto">
<div class="mb-16" v-for="category in list" :key="category.name">
<h1 class="text-2xl text-gray-800 font-semibold mb-6 capitalize" v-text="category.name"></h1>
<view-component v-for="component in category.components" :key="component.name" :name="component.name">
<view-component v-for="component in category.components" :key="component.name" :name="component.name" class="mt-6">
<div slot="component">
<component :is="component.name | toId" class="mb-10"></component>
</div>
@@ -43,7 +43,7 @@
import NotificationPop from "./UI/Alert/NotificationPop";
import UserDetails from "./UI/Cards/UserDetails";
import Testimonial from "./UI/Cards/Testimonial";
import Article from "./UI/Cards/Article";
import ArticleCard from "./UI/Cards/ArticleCard";
import Product from "./UI/Cards/Product";
import ProductEvaluation from "./UI/Cards/ProductWithEvaluation";
import Login from "./UI/Forms/Login";
@@ -56,7 +56,7 @@
NotificationPop,
UserDetails,
Testimonial,
Article,
ArticleCard,
Product,
ProductEvaluation,
Login,