added styling for the exercise list
parent
16ae5880e1
commit
29d68d8b9b
|
|
@ -1,23 +1,24 @@
|
||||||
<template>
|
<template>
|
||||||
<input type="text" v-model="input" placeholder="Search..." />
|
<input type="text" v-model="input" placeholder="Search..." />
|
||||||
<div v-for="exercise in filterExercises()" :key="exercise.name">
|
<div class="exerciseList">
|
||||||
<button>{{ exercise.name }}</button>
|
<li class="exerciseItem" v-for="exercise in filterExercises()" :key="exercise.name">
|
||||||
</div>
|
<button class="button">{{ exercise.name }}</button>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import { usePostStore } from '@/stores/store.js'
|
import { usePostStore } from '@/stores/store.js'
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
|
|
||||||
|
const muscle = defineProps({
|
||||||
|
muscle: String
|
||||||
|
})
|
||||||
|
|
||||||
const json = usePostStore()
|
const json = usePostStore()
|
||||||
const exercises = ref([])
|
const exercises = ref([])
|
||||||
|
|
||||||
const muscle = defineProps({
|
|
||||||
muscle: String
|
|
||||||
})
|
|
||||||
|
|
||||||
console.log(muscle.muscle)
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await json.fetchMuscleExercise()
|
await json.fetchMuscleExercise()
|
||||||
|
|
@ -50,4 +51,15 @@ onMounted(async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.exerciseList{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 1px;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue