This commit is contained in:
khatabwedaa
2020-06-12 13:14:52 +02:00
parent c1fa2fcaa1
commit 5967af2ad3
7 changed files with 124 additions and 44 deletions

View File

@@ -1,13 +1,29 @@
<template> <template>
<div class="w-full max-w-5xl mx-auto my-10"> <div class="w-full max-w-5xl mx-auto my-10">
<h1 class="text-2xl text-gray-800 font-semibold capitalize mb-6">Alerts</h1>
<success-pop></success-pop> <success-pop></success-pop>
<info-pop></info-pop>
<warning-pop></warning-pop>
<error-pop></error-pop>
<notification-pop></notification-pop>
</div> </div>
</template> </template>
<script> <script>
import SuccessPop from "../ui/Alerts/SuccessPop"; import SuccessPop from "../ui/Alerts/SuccessPop";
import InfoPop from "../ui/Alerts/InfoPop";
import WarningPop from "../ui/Alerts/WarningPop";
import ErrorPop from "../ui/Alerts/ErrorPop";
import NotificationPop from "../ui/Alerts/NotificationPop";
export default { export default {
components: { SuccessPop }, components: {
SuccessPop ,
InfoPop ,
WarningPop,
ErrorPop,
NotificationPop,
},
}; };
</script> </script>

View File

@@ -1,5 +1,6 @@
<template> <template>
<div class="px-3" :id="name | toId"> <view-component :name="name" :code="code">
<div class="px-3 py-6" slot="component">
<div class="flex max-w-sm w-full mx-auto bg-white shadow-md rounded-lg overflow-hidden"> <div class="flex max-w-sm w-full mx-auto bg-white shadow-md rounded-lg overflow-hidden">
<div class="flex justify-center items-center w-12 bg-red-500"> <div class="flex justify-center items-center w-12 bg-red-500">
<svg class="h-6 w-6 fill-current text-white" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"> <svg class="h-6 w-6 fill-current text-white" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
@@ -15,6 +16,7 @@
</div> </div>
</div> </div>
</div> </div>
</view-component>
</template> </template>
<script> <script>
@@ -22,6 +24,21 @@
data() { data() {
return { return {
name: 'Error Pop', name: 'Error Pop',
code: `
<div class="flex max-w-sm w-full mx-auto bg-white shadow-md rounded-lg overflow-hidden">
<div class="flex justify-center items-center w-12 bg-red-500">
<svg class="h-6 w-6 fill-current text-white" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
<path d="M20 3.36667C10.8167 3.36667 3.3667 10.8167 3.3667 20C3.3667 29.1833 10.8167 36.6333 20 36.6333C29.1834 36.6333 36.6334 29.1833 36.6334 20C36.6334 10.8167 29.1834 3.36667 20 3.36667ZM19.1334 33.3333V22.9H13.3334L21.6667 6.66667V17.1H27.25L19.1334 33.3333Z"/>
</svg>
</div>
<div class="-mx-3 py-2 px-4">
<div class="mx-3">
<span class="text-red-500 font-semibold">Error</span>
<p class="text-gray-600 text-sm">Your email is already used!</p>
</div>
</div>
</div>`
} }
} }
} }

View File

@@ -1,5 +1,6 @@
<template> <template>
<div class="px-3" :id="name | toId"> <view-component :name="name" :code="code">
<div class="px-3 py-6" slot="component">
<div class="flex max-w-sm w-full mx-auto bg-white shadow-md rounded-lg overflow-hidden"> <div class="flex max-w-sm w-full mx-auto bg-white shadow-md rounded-lg overflow-hidden">
<div class="flex justify-center items-center w-12 bg-blue-500"> <div class="flex justify-center items-center w-12 bg-blue-500">
<svg class="h-6 w-6 fill-current text-white" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"> <svg class="h-6 w-6 fill-current text-white" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
@@ -15,6 +16,7 @@
</div> </div>
</div> </div>
</div> </div>
</view-component>
</template> </template>
<script> <script>
@@ -22,6 +24,21 @@
data() { data() {
return { return {
name: 'Info Pop', name: 'Info Pop',
code: `
<div class="flex max-w-sm w-full mx-auto bg-white shadow-md rounded-lg overflow-hidden">
<div class="flex justify-center items-center w-12 bg-blue-500">
<svg class="h-6 w-6 fill-current text-white" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
<path d="M20 3.33331C10.8 3.33331 3.33337 10.8 3.33337 20C3.33337 29.2 10.8 36.6666 20 36.6666C29.2 36.6666 36.6667 29.2 36.6667 20C36.6667 10.8 29.2 3.33331 20 3.33331ZM21.6667 28.3333H18.3334V25H21.6667V28.3333ZM21.6667 21.6666H18.3334V11.6666H21.6667V21.6666Z"/>
</svg>
</div>
<div class="-mx-3 py-2 px-4">
<div class="mx-3">
<span class="text-blue-500 font-semibold">Info</span>
<p class="text-gray-600 text-sm">This channel archived by owner !</p>
</div>
</div>
</div>`
} }
} }
} }

View File

@@ -1,5 +1,6 @@
<template> <template>
<div class="px-3" :id="name | toId"> <view-component :name="name" :code="code">
<div class="px-3 py-6" slot="component">
<div class="flex max-w-sm w-full bg-white shadow-md rounded-lg overflow-hidden mx-auto"> <div class="flex max-w-sm w-full bg-white shadow-md rounded-lg overflow-hidden mx-auto">
<div class="w-2 bg-gray-800"></div> <div class="w-2 bg-gray-800"></div>
<div class="flex items-center px-2 py-3"> <div class="flex items-center px-2 py-3">
@@ -11,6 +12,7 @@
</div> </div>
</div> </div>
</div> </div>
</view-component>
</template> </template>
<script> <script>
@@ -18,6 +20,17 @@
data() { data() {
return { return {
name: 'Notification Pop', name: 'Notification Pop',
code: `
<div class="flex max-w-sm w-full bg-white shadow-md rounded-lg overflow-hidden mx-auto">
<div class="w-2 bg-gray-800"></div>
<div class="flex items-center px-2 py-3">
<img class="w-10 h-10 object-cover rounded-full" alt="User avatar" src="https://images.unsplash.com/photo-1477118476589-bff2c5c4cfbb?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=200&q=200">
<div class="mx-3">
<p class="text-gray-600">Sara was replied on the <a class="text-blue-500 hover:text-blue-400 hover:underline">upload image</a>.</p>
</div>
</div>
</div>`,
} }
}, },
} }

View File

@@ -1,5 +1,6 @@
<template> <template>
<div class="px-3" :id="name | toId"> <view-component :name="name" :code="code">
<div class="px-3 py-6" slot="component">
<div class="flex max-w-sm w-full mx-auto bg-white shadow-md rounded-lg overflow-hidden"> <div class="flex max-w-sm w-full mx-auto bg-white shadow-md rounded-lg overflow-hidden">
<div class="flex justify-center items-center w-12 bg-yellow-500"> <div class="flex justify-center items-center w-12 bg-yellow-500">
<svg class="h-6 w-6 fill-current text-white" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"> <svg class="h-6 w-6 fill-current text-white" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
@@ -15,6 +16,7 @@
</div> </div>
</div> </div>
</div> </div>
</view-component>
</template> </template>
<script> <script>
@@ -22,6 +24,21 @@
data() { data() {
return { return {
name: 'Warning Pop', name: 'Warning Pop',
code: `
<div class="flex max-w-sm w-full mx-auto bg-white shadow-md rounded-lg overflow-hidden">
<div class="flex justify-center items-center w-12 bg-yellow-500">
<svg class="h-6 w-6 fill-current text-white" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
<path d="M20 3.33331C10.8 3.33331 3.33337 10.8 3.33337 20C3.33337 29.2 10.8 36.6666 20 36.6666C29.2 36.6666 36.6667 29.2 36.6667 20C36.6667 10.8 29.2 3.33331 20 3.33331ZM21.6667 28.3333H18.3334V25H21.6667V28.3333ZM21.6667 21.6666H18.3334V11.6666H21.6667V21.6666Z"/>
</svg>
</div>
<div class="-mx-3 py-2 px-4">
<div class="mx-3">
<span class="text-yellow-500 font-semibold">Warning</span>
<p class="text-gray-600 text-sm">Your image size is to large !</p>
</div>
</div>
</div>`
} }
} }
} }

View File

@@ -1,6 +1,6 @@
<template> <template>
<div class="rounded overflow-hidden"> <div class="rounded overflow-hidden">
<pre><code class="px-8 py-2 rounded-md overflow-x-scroll overflow-hidden">{{ code }}</code></pre> <pre><code class="px-8 py-6 rounded-md overflow-x-scroll overflow-hidden">{{ code }}</code></pre>
</div> </div>
</template> </template>

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="bg-gray-300 border rounded-md overflow-hidden"> <div class="bg-gray-300 border rounded-md overflow-hidden mb-12">
<div class="bg-white px-4 py-2 border-b"> <div class="bg-white px-4 py-2 border-b">
<div class="flex flex-col md:flex-row justify-between items-center"> <div class="flex flex-col md:flex-row justify-between items-center">
<div class="text-gray-700 font-medium capitalize md:text-lg">{{ name }}</div> <div class="text-gray-700 font-medium capitalize md:text-lg">{{ name }}</div>