Skip to content

Instantly share code, notes, and snippets.

@iheartkode
Created March 7, 2016 19:41
Show Gist options
  • Save iheartkode/7531ebdf2cd79f3a10df to your computer and use it in GitHub Desktop.
Save iheartkode/7531ebdf2cd79f3a10df to your computer and use it in GitHub Desktop.
<template>
<div>
<button @click="newWorkoutButton">New Workout</button><br><br>
<div id="workout-form" v-if="newWorkout">
<h2>New Workout</h2>
<input type="text" placeholder="Area you worked out." v-model="areaWorkedOut"><br>
<input type="text" placeholder="Workout length in minutes" v-model="workoutLength"><br>
<input type="text" placeholder="Current mood, eg: lazy, tired etc." v-model="workoutMood"/><br>
<textarea name="textarea" rows="5" cols="25" placeholder="Notes" v-model="notes"></textarea><br><br>
<button @click="createWorkout">Submit</button>
</div>
</div>
</template>
<script>
import Vue from 'vue';
const NewWorkout = Vue.extend ({
data () {
return {
newWorkout: false
}
},
methods: {
newWorkoutButton() {
this.newWorkout = true;
},
createWorkout() {
newWorkoutData = {
}
}
}
});
export default NewWorkout;
</script>
<style>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment