41 lines
No EOL
517 B
JavaScript
41 lines
No EOL
517 B
JavaScript
import Range from "./range.js";
|
|
|
|
const Step =
|
|
{
|
|
props: ["prompt", "fields"],
|
|
|
|
components: {
|
|
Range
|
|
},
|
|
|
|
setup(props)
|
|
{
|
|
return { };
|
|
},
|
|
|
|
template: `
|
|
<div class="step">
|
|
|
|
<div class="prompt">{{ prompt }}</div>
|
|
|
|
<div class="fields" v-for="field in fields">
|
|
|
|
<Range :field="field" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
`
|
|
}
|
|
|
|
export default Step;
|
|
|
|
/*
|
|
|
|
Single step of the form, can have multiple fields.
|
|
|
|
There is only one type of field (range), but could be more.
|
|
|
|
Were gonna pass in the data object to the field.
|
|
|
|
*/ |