Created
September 9, 2019 07:03
-
-
Save mornir/3f806859101df087b7e73c49a035d4aa to your computer and use it in GitHub Desktop.
Card component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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