meilisearch-admin/app/components/input-text.hbs

26 lines
586 B
Handlebars
Raw Normal View History

2022-03-24 08:36:20 +00:00
<div>
{{#if @label}}
<label for={{this.id}} class="block font-medium mb-1 text-dark">{{@label}}</label>
{{/if}}
<div class="relative flex items-center border rounded-md border-light">
{{#if @prefixIcon}}
<MdIcon
@icon={{@prefixIcon}}
class="h-8 w-8 pl-2 text-light"
/>
{{/if}}
<input
type="text"
name={{@name}}
id={{this.id}}
class="block w-full p-2 bg-transparent focus:outline-none"
placeholder={{@placeholder}}
value={{@value}}
{{on 'input' this.onChange}}
>
</div>
</div>
{{yield}}