Created
March 6, 2018 08:39
-
-
Save sparrow/f9be4f12279fb9738a179f3e3576924d to your computer and use it in GitHub Desktop.
This is a JavaScript code snippet that we used for our blog post https://rubygarage.org/blog/things-vue-takes-from-react-and-angular at RubyGarage. This is an example of animation implementation in Vue.
This file contains 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> | |
<div> | |
<div class='item'> | |
<div class='middle aligned content'> | |
<div class='ui fitted checkbox'> | |
<input @click='removeTask(task)' type='checkbox'> | |
<label></label> | |
</div> | |
<span class='task-text'>{{task}}</span> | |
</div> | |
</div> | |
<div class='ui divider'></div> | |
</div> | |
</template> | |
<script> | |
export default { | |
props: ['task', 'removeTask'] | |
} | |
</script> | |
<style> | |
.item { | |
padding: 5px 0; | |
line-height: 30px; | |
} | |
.task-text { | |
vertical-align: middle; | |
margin-left: 5px; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment