meilisearch-admin/app/components/input-text.hbs
2022-03-28 13:37:09 +03:00

26 lines
664 B
Handlebars

<div class="mb-4">
{{#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>
{{#if @helper}}
<div class="mt-1 text-sm">{{@helper}}</div>
{{/if}}
</div>