feat: Update UI for edit contact modal (#1833)
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<transition name="modal-fade">
|
<transition name="modal-fade">
|
||||||
<div
|
<div
|
||||||
v-if="show"
|
v-if="show"
|
||||||
class="modal-mask"
|
:class="modalClassName"
|
||||||
transition="modal"
|
transition="modal"
|
||||||
@click="onBackDropClick"
|
@click="onBackDropClick"
|
||||||
>
|
>
|
||||||
@@ -30,6 +30,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
modalType: {
|
||||||
|
type: String,
|
||||||
|
default: 'centered',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalContainerClassName() {
|
modalContainerClassName() {
|
||||||
@@ -39,6 +43,14 @@ export default {
|
|||||||
}
|
}
|
||||||
return className;
|
return className;
|
||||||
},
|
},
|
||||||
|
modalClassName() {
|
||||||
|
const modalClassNameMap = {
|
||||||
|
centered: '',
|
||||||
|
'right-aligned': 'right-aligned',
|
||||||
|
};
|
||||||
|
|
||||||
|
return `modal-mask ${modalClassNameMap[this.modalType] || ''}`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.addEventListener('keydown', e => {
|
document.addEventListener('keydown', e => {
|
||||||
@@ -60,7 +72,7 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
.modal-container--full-width {
|
.modal-container--full-width {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
@@ -69,4 +81,14 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-mask.right-aligned {
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
.modal-container {
|
||||||
|
border-radius: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 48rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<form class="contact--form" @submit.prevent="handleSubmit">
|
<form class="contact--form" @submit.prevent="handleSubmit">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="medium-9 columns">
|
<div class="columns">
|
||||||
<label :class="{ error: $v.name.$error }">
|
<label :class="{ error: $v.name.$error }">
|
||||||
{{ $t('CONTACT_FORM.FORM.NAME.LABEL') }}
|
{{ $t('CONTACT_FORM.FORM.NAME.LABEL') }}
|
||||||
<input
|
<input
|
||||||
@@ -37,14 +37,14 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<woot-input
|
<woot-input
|
||||||
v-model.trim="phoneNumber"
|
v-model.trim="phoneNumber"
|
||||||
class="medium-6 columns"
|
class="columns"
|
||||||
:label="$t('CONTACT_FORM.FORM.PHONE_NUMBER.LABEL')"
|
:label="$t('CONTACT_FORM.FORM.PHONE_NUMBER.LABEL')"
|
||||||
:placeholder="$t('CONTACT_FORM.FORM.PHONE_NUMBER.PLACEHOLDER')"
|
:placeholder="$t('CONTACT_FORM.FORM.PHONE_NUMBER.PLACEHOLDER')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<woot-input
|
<woot-input
|
||||||
v-model.trim="companyName"
|
v-model.trim="companyName"
|
||||||
class="medium-6 columns"
|
class="columns"
|
||||||
:label="$t('CONTACT_FORM.FORM.COMPANY_NAME.LABEL')"
|
:label="$t('CONTACT_FORM.FORM.COMPANY_NAME.LABEL')"
|
||||||
:placeholder="$t('CONTACT_FORM.FORM.COMPANY_NAME.PLACEHOLDER')"
|
:placeholder="$t('CONTACT_FORM.FORM.COMPANY_NAME.PLACEHOLDER')"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<woot-modal :show.sync="show" :on-close="onCancel">
|
<woot-modal :show.sync="show" :on-close="onCancel" modal-type="right-aligned">
|
||||||
<div class="column content-box">
|
<div class="column content-box">
|
||||||
<woot-modal-header
|
<woot-modal-header
|
||||||
:header-title="$t('CREATE_CONTACT.TITLE')"
|
:header-title="$t('CREATE_CONTACT.TITLE')"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<woot-modal :show.sync="show" :on-close="onCancel">
|
<woot-modal :show.sync="show" :on-close="onCancel" modal-type="right-aligned">
|
||||||
<div class="column content-box">
|
<div class="column content-box">
|
||||||
<woot-modal-header
|
<woot-modal-header
|
||||||
:header-title="
|
:header-title="
|
||||||
|
|||||||
Reference in New Issue
Block a user