Skip to content
Snippets Groups Projects

Accept preview challenge component

6 files
+ 122
40
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -8,6 +8,10 @@ const time = ref(7);
@@ -8,6 +8,10 @@ const time = ref(7);
const goal = ref(100);
const goal = ref(100);
const originalGoal = ref(100);
const originalGoal = ref(100);
 
/**
 
* Updates the time and goal based on the new time
 
* @param newTime
 
*/
const updateTime = (newTime) => {
const updateTime = (newTime) => {
time.value = newTime;
time.value = newTime;
switch (newTime) {
switch (newTime) {
@@ -27,7 +31,7 @@ const updateTime = (newTime) => {
@@ -27,7 +31,7 @@ const updateTime = (newTime) => {
</script>
</script>
<template>
<template>
<SuggestedSavingChallenge :clampLines="100" :time="time" :goal="goal" :originalGoal="originalGoal" @updateTime="updateTime"/>
<SuggestedSavingChallenge :isPreview="true" :time="time" :goal="goal" :originalGoal="originalGoal" @updateTime="updateTime"/>
<p class="flex justify-center">Lengde på utfordring:</p>
<p class="flex justify-center">Lengde på utfordring:</p>
<ToggleGroup type="single" variant="outline">
<ToggleGroup type="single" variant="outline">
<ToggleGroupItem value="7" aria-label="Toggle seven" @click ="updateTime(7)">
<ToggleGroupItem value="7" aria-label="Toggle seven" @click ="updateTime(7)">
Loading