Skip to content

Instantly share code, notes, and snippets.

@NovoManu
Created August 18, 2019 17:50
Show Gist options
  • Save NovoManu/13ee96e4b9a09801d4ce3284ca675e1f to your computer and use it in GitHub Desktop.
Save NovoManu/13ee96e4b9a09801d4ce3284ca675e1f to your computer and use it in GitHub Desktop.
<template>
<div class="todo-list__row">
<span>{{ todo.id }}: </span>
<span :class="{ 'todo-list__row--completed': todo.completed }">{{
todo.title
}}</span>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator'
import { ITodo } from '@/types'
@Component
export default class Home extends Vue {
@Prop({ required: true }) todo!: ITodo
}
</script>
<style lang="scss">
.todo-list {
&__row {
width: 100%;
text-align: left;
color: #4169e1;
&--completed {
text-decoration: line-through;
color: #2e8b57;
}
}
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment