Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
php server side rendering
// FeatureItem.vue
<div v-bind:style="{ color: textColor }" v-on:click="toggleColor">
<h2>{{ }}</h2>
<p>{{ feature.description }}</p>
import {PropType} from 'vue'
export default {
props: ['feature'],
data() {
return {textColor: 'black'}
methods: {
toggleColor() {
if (this.$data.textColor == 'black') {
this.$data.textColor = 'green'
} else {
this.$data.textColor = 'black'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment