-
-
Save herrphon/01f4fc2c480437500d455dd77ab88bd1 to your computer and use it in GitHub Desktop.
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> | |
<!-- Will add/remove .small if the width is less / greater --> | |
<div class="post__item" v-responsive="{ small: el => el.width <= 500 }"> | |
<img class="post__image" :src="post.image" /> | |
<div class="post__text">{{post.text}}</div> | |
</div> | |
</template> | |
<script> | |
import { ResponsiveDirective } from "vue-responsive-components" | |
export default { | |
props: ["post"], | |
directives: { | |
responsive: ResponsiveDirective | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment