|
1 | 1 | <template> |
2 | 2 | <!-- eslint-disable max-len --> |
3 | | - <div class="w-full my-4"> |
| 3 | + <div class="w-full my-4 md:max-w-sm"> |
4 | 4 | <ValidationObserver v-slot="{ handleSubmit, invalid }" class="w-full"> |
5 | 5 | <form @submit.prevent="handleSubmit(onSubmit)" class="w-full"> |
6 | 6 | <div class="flex justify-between items-center w-full"> |
|
9 | 9 | v-bind:class="{'text-sm': true,'text-purple-matcha': true, 'bg-transparent': true, 'focus:outline-none': true, 'active:outline-none': true, 'opacity-50': invalid, 'cursor-pointer': !invalid}"> |
10 | 10 | <h1 v-if="!edit" v-on:click="startEditing()" class="cursor-pointer text-sm text-purple-matcha">{{ buttonText }}</h1> |
11 | 11 | </div> |
12 | | - <div class="break-words" v-if="!edit && type !== 'password'"><h1 class="text-md opacity-50 max-w-xs">{{ currentValue }}</h1></div> |
| 12 | + <div class="break-words" v-if="!edit && type !== 'password'"><h1 class="text-md opacity-50 md:max-w-sm">{{ currentValue }}</h1></div> |
13 | 13 | <div v-if="edit"> |
14 | 14 | <ValidationProvider v-if="type === 'firstName'" name="First Name" rules="required|alpha|max:20" v-slot="{errors}"> |
15 | | - <input type="text" placeholder="First Name" v-model="currentValue" class="matcha-input max-w-xs"> |
| 15 | + <input type="text" placeholder="First Name" v-model="currentValue" class="matcha-input md:max-w-sm"> |
16 | 16 | <span class="matcha-input-error">{{ errors[0] }}</span> |
17 | 17 | </ValidationProvider> |
18 | 18 | <ValidationProvider v-if="type === 'lastName'" name="Last Name" rules="required|alpha|max:20" v-slot="{errors}"> |
19 | | - <input type="text" placeholder="Last Name" v-model="currentValue" class="matcha-input max-w-xs"> |
| 19 | + <input type="text" placeholder="Last Name" v-model="currentValue" class="matcha-input md:max-w-sm"> |
20 | 20 | <span class="matcha-input-error">{{ errors[0] }}</span> |
21 | 21 | </ValidationProvider> |
22 | 22 | <ValidationProvider v-if="type === 'email'" name="Email" rules="required|email|max:50" v-slot="{errors}"> |
23 | | - <input type="email" placeholder="Email" v-model="currentValue" class="matcha-input max-w-xs"> |
| 23 | + <input type="email" placeholder="Email" v-model="currentValue" class="matcha-input md:max-w-sm"> |
24 | 24 | <span class="matcha-input-error">{{ errors[0] }}</span> |
25 | 25 | </ValidationProvider> |
26 | 26 | <ValidationProvider v-if="type === 'username'" name="Username" rules="required|alpha_dash|max:20" v-slot="{errors}"> |
27 | | - <input type="text" placeholder="Username" v-model="currentValue" class="matcha-input max-w-xs"> |
| 27 | + <input type="text" placeholder="Username" v-model="currentValue" class="matcha-input md:max-w-sm"> |
28 | 28 | <span class="matcha-input-error">{{ errors[0] }}</span> |
29 | 29 | </ValidationProvider> |
30 | 30 | <ValidationProvider v-if="type === 'bio'" name="Biography" rules="required|min:50|max:200" v-slot="{errors}"> |
31 | | - <textarea style="resize: none;" rows="4" type="text" placeholder="Biography" v-model="currentValue" class="matcha-input max-w-xs block"></textarea> |
| 31 | + <textarea style="resize: none;" rows="4" type="text" placeholder="Biography" v-model="currentValue" class="matcha-input md:max-w-sm block"></textarea> |
32 | 32 | <span class="matcha-input-error">{{ errors[0] }}</span> |
33 | 33 | </ValidationProvider> |
34 | 34 | <ValidationProvider v-if="type === 'password'" name="Password" rules="required|min:6|validPassword" v-slot="{errors}"> |
35 | | - <input type="password" placeholder="New Password" v-model="currentValue" class="matcha-input max-w-xs"> |
| 35 | + <input type="password" placeholder="New Password" v-model="currentValue" class="matcha-input md:max-w-sm"> |
36 | 36 | <span class="matcha-input-error">{{ passwordErrorHandler(errors[0]) }}</span> |
37 | 37 | </ValidationProvider> |
38 | 38 | <ValidationProvider v-if="type === 'password'" name="Repeat Password" rules="required|confirmed:Password" v-slot="{errors}"> |
|
0 commit comments