Skip to content

Instantly share code, notes, and snippets.

@mornir
Created September 9, 2019 07:03
Show Gist options
  • Save mornir/3f806859101df087b7e73c49a035d4aa to your computer and use it in GitHub Desktop.
Save mornir/3f806859101df087b7e73c49a035d4aa to your computer and use it in GitHub Desktop.
Card component
<template>
<figure>
<v-lazy-image :src="img"
:src-placeholder="lqip"
class="w-full object-cover"
:alt="alt" />
<figcaption class="mt-3 max-w-sm">
<span class="block font-bold text-2xl leading-tight">{{ title }}</span>
<span class="block text-base tracking-wide">{{ subtitle }}</span>
</figcaption>
</figure>
</template>
<script>
export default {
props: {
img: {
type: String,
required: true,
default: '',
},
lqip: {
type: String,
},
alt: {
type: String,
required: false,
default: '',
},
title: {
type: String,
required: false,
default: '',
},
subtitle: {
type: String,
required: false,
default: '',
},
},
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment