feat: introducing a new smart input hoppscotch ui component (#3089)

Co-authored-by: Anwarul Islam <anwaarulislaam@gmail.com>
This commit is contained in:
Joel Jacob Stephen
2023-08-05 23:45:02 +05:30
committed by GitHub
parent 01cf59c663
commit 81fbb22c51
33 changed files with 543 additions and 639 deletions

View File

@@ -41,22 +41,14 @@
class="flex flex-col space-y-4"
@submit.prevent="signInWithEmail"
>
<div class="flex flex-col">
<input
id="email"
v-model="form.email"
class="input floating-input"
placeholder=" "
type="email"
name="email"
autocomplete="off"
required
spellcheck="false"
v-focus
autofocus
/>
<label for="email"> Email </label>
</div>
<HoppSmartInput
v-model="form.email"
type="email"
placeholder=" "
input-styles="floating-input"
label="Email"
/>
<HoppButtonPrimary
:loading="signingInWithEmail"
type="submit"

View File

@@ -18,18 +18,8 @@
@input="(email: string) => getOwnerEmail(email)"
/>
</div>
<div class="flex flex-col">
<label for="teamName" class="py-2">{{ t('teams.name') }} </label>
<input
id="teamName"
v-model="teamName"
v-focus
class="input relative"
placeholder=""
type="email"
autocomplete="off"
/>
</div>
<label for="teamName"> {{ t('teams.name') }} </label>
<HoppSmartInput v-model="teamName" placeholder="" class="!my-2" />
</div>
</template>
<template #footer>

View File

@@ -20,24 +20,26 @@
'!border-accent': showRenameInput,
}"
>
<input
class="bg-transparent flex-1 p-3 rounded-md !rounded-r-none disabled:select-none border-r-0 disabled:cursor-default disabled:opacity-50"
type="text"
<HoppSmartInput
v-model="newTeamName"
styles="bg-transparent flex-1 rounded-md !rounded-r-none disabled:select-none border-r-0 disabled:cursor-default disabled:opacity-50"
placeholder="Team Name"
autofocus
:disabled="!showRenameInput"
v-focus
/>
<HoppButtonPrimary
class="!rounded-l-none"
filled
:icon="showRenameInput ? IconSave : IconEdit"
:label="
showRenameInput ? `${t('teams.rename')}` : `${t('teams.edit')}`
"
@click="handleNameEdit()"
/>
>
<template #button>
<HoppButtonPrimary
class="!rounded-l-none"
filled
:icon="showRenameInput ? IconSave : IconEdit"
:label="
showRenameInput
? `${t('teams.rename')}`
: `${t('teams.edit')}`
"
@click="handleNameEdit()"
/>
</template>
</HoppSmartInput>
</div>
</div>

View File

@@ -6,19 +6,11 @@
@close="$emit('hide-modal')"
>
<template #body>
<div class="flex flex-col">
<input
id="inviteUserEmail"
v-model="email"
v-focus
class="input floating-input"
placeholder=" "
type="text"
autocomplete="off"
@keyup.enter="sendInvite"
/>
<label for="inviteUserEmail">{{ t('users.email_address') }}</label>
</div>
<HoppSmartInput
v-model="email"
:label="t('users.email_address')"
input-styles="floating-input"
/>
</template>
<template #footer>
<span class="flex space-x-2">