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>
<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>
<info-pop></info-pop>
<warning-pop></warning-pop>
<error-pop></error-pop>
<notification-pop></notification-pop>
</div>
</template>
<script>
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 {
components: { SuccessPop },
components: {
SuccessPop ,
InfoPop ,
WarningPop,
ErrorPop,
NotificationPop,
},
};
</script>

View File

@@ -1,5 +1,30 @@
<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 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>
</div>
</view-component>
</template>
<script>
export default {
data() {
return {
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">
@@ -13,15 +38,7 @@
<p class="text-gray-600 text-sm">Your email is already used!</p>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
name: 'Error Pop',
</div>`
}
}
}

View File

@@ -1,8 +1,33 @@
<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 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>
</div>
</view-component>
</template>
<script>
export default {
data() {
return {
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">
<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>
@@ -13,15 +38,7 @@
<p class="text-gray-600 text-sm">This channel archived by owner !</p>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
name: 'Info Pop',
</div>`
}
}
}

View File

@@ -1,5 +1,26 @@
<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="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>
</div>
</view-component>
</template>
<script>
export default {
data() {
return {
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">
@@ -9,15 +30,7 @@
<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>
</div>
</template>
<script>
export default {
data() {
return {
name: 'Notification Pop',
</div>`,
}
},
}

View File

@@ -1,5 +1,30 @@
<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 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>
</div>
</view-component>
</template>
<script>
export default {
data() {
return {
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">
@@ -13,15 +38,7 @@
<p class="text-gray-600 text-sm">Your image size is to large !</p>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
name: 'Warning Pop',
</div>`
}
}
}

View File

@@ -1,6 +1,6 @@
<template>
<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>
</template>

View File

@@ -1,5 +1,5 @@
<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="flex flex-col md:flex-row justify-between items-center">
<div class="text-gray-700 font-medium capitalize md:text-lg">{{ name }}</div>