Add basics for project entry wizard

This commit is contained in:
Ramon Wenger 2019-01-30 10:50:07 +01:00
parent 906b5c88bd
commit 662a3b8d4b
4 changed files with 99 additions and 4 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="modal__backdrop"> <div class="modal__backdrop">
<div class="modal"> <div class="modal" :class="{'modal--hide-header': hideHeader}">
<div class="modal__header"> <div class="modal__header">
<slot name="header"></slot> <slot name="header"></slot>
</div> </div>
@ -19,6 +19,13 @@
<script> <script>
export default { export default {
props: {
hideHeader: {
type: Boolean,
default: false
}
},
methods: { methods: {
hideModal() { hideModal() {
this.$store.dispatch('hideModal'); this.$store.dispatch('hideModal');
@ -44,6 +51,19 @@
grid-template-areas: "header" "body" "footer"; grid-template-areas: "header" "body" "footer";
position: relative; position: relative;
&--hide-header {
grid-template-rows: 1fr 65px;
grid-template-areas: "body" "footer";
}
&--hide-header &__header {
display: none;
}
&--hide-header &__body {
padding: $default-padding;
}
&__backdrop { &__backdrop {
display: grid; display: grid;
position: fixed; position: fixed;

View File

@ -0,0 +1,57 @@
<template>
<div class="text-form-with-help-text">
<h3 class="text-form-with-help-text__heading"><span class="text-form-with-help-text__title">{{title}}</span>
<info-icon class="text-form-with-help-text__icon"></info-icon>
</h3>
<text-form @text-change-value="$emit('change', $event.target.value)" :value="v"></text-form>
</div>
</template>
<script>
import TextForm from '@/components/content-forms/TextForm';
import InfoIcon from '@/components/icons/InfoIcon';
export default {
props: ['title', 'value'],
components: {
TextForm,
InfoIcon
},
computed: {
v() {
return {
text: this.value
}
}
}
}
</script>
<style scoped lang="scss">
@import "@/styles/_variables.scss";
@import "@/styles/_functions.scss";
.text-form-with-help-text {
margin-bottom: 30px;
&__heading {
margin-bottom: 15px;
display: flex;
justify-items: center;
}
&__title {
font-size: toRem(22px);
font-weight: 600;
margin-right: 8px;
}
&__icon {
width: 20px;
height: 20px;
fill: $color-grey;
}
}
</style>

View File

@ -1,15 +1,30 @@
<template> <template>
<modal> <modal :hide-header="true">
<h1>Hello</h1> <div class="project-entry-modal">
<text-form-with-help-text title="Tätigkeit" :value="value">
</text-form-with-help-text>
<text-form-with-help-text title="Reflexion" :value="value">
</text-form-with-help-text>
<text-form-with-help-text title="Nächste Schritte" :value="value">
</text-form-with-help-text>
</div>
</modal> </modal>
</template> </template>
<script> <script>
import Modal from '@/components/Modal'; import Modal from '@/components/Modal';
import TextFormWithHelpText from '@/components/content-forms/TextFormWithHelpText';
export default { export default {
components: { components: {
Modal Modal,
TextFormWithHelpText
}, },
data() {
return {
value: ''
}
}
} }
</script> </script>

View File

@ -54,3 +54,6 @@ $input-border-radius: 3px;
//modal stuff //modal stuff
$modal-lateral-padding: 34px; $modal-lateral-padding: 34px;
$modal-input-width: 560px; $modal-input-width: 560px;
$default-padding: 30px;