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

@@ -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>