Skip to content

Instantly share code, notes, and snippets.

@apgapg
Created January 7, 2020 06:12
Show Gist options
  • Save apgapg/3408836936574552f9e016cb4ae4bb51 to your computer and use it in GitHub Desktop.
Save apgapg/3408836936574552f9e016cb4ae4bb51 to your computer and use it in GitHub Desktop.
Error Card in Vue, Vuetify
<template>
<v-container fluid>
<v-card outlined>
<v-container class="py-8">
<div class="d-flex justify-center mb-4">
<v-icon size="40">mdi-emoticon-sad-outline</v-icon>
</div>
<p class="title text-center my-0 py-0 grey--text text--darken-3">Oops! Something totally went wrong</p>
<p class="subtitle-1 red--text text-center my-0 py-0">{{error}}</p>
<div class="d-flex justify-center mt-6">
<v-btn @click="onClick" color="primary">
<v-icon class="mr-2">mdi-refresh</v-icon>
REFRESH
</v-btn>
</div>
<p class="body-2 text-center mt-6 py-0 grey--text text--darken-1">If problem persist kindly write us at
abc@abc.com</p>
<div class="d-flex justify-center mt-2">
<v-btn @click="onMailClick" class="red--text">
<v-icon class="mr-2">mdi-email-edit-outline</v-icon>
MAIL US
</v-btn>
</div>
</v-container>
</v-card>
</v-container>
</template>
<script>
export default {
name: "network-error",
props: {
error: {
type: String,
default: "Something went wrong",
}
},
methods: {
onClick() {
this.$emit("onClick");
},
onMailClick() {
window.open(`mailto:abc@abc.com?subject=Bug Report&body=Hello`);
}
}
};
</script>
<style scoped>
</style>
@apgapg
Copy link
Author

apgapg commented Jan 7, 2020

Screenshot 2020-01-04 at 3 16 26 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment