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

27 lines
637 B
Handlebars
Raw Normal View History

2022-03-24 10:56:55 +00:00
<div class="mb-4">
2022-03-24 08:36:20 +00:00
{{#if @label}}
2022-04-26 10:28:40 +00:00
<label for={{this.id}} class="block font-medium mb-1 text-dark">
{{@label}}
</label>
2022-03-24 08:36:20 +00:00
{{/if}}
2022-04-13 08:26:24 +00:00
<div class="relative flex items-center border rounded-md border-gray">
2022-03-24 08:36:20 +00:00
{{#if @prefixIcon}}
2022-04-26 10:28:40 +00:00
<@prefixIcon class="h-8 w-8 pl-2" />
2022-03-24 08:36:20 +00:00
{{/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}}
2022-04-26 10:28:40 +00:00
/>
2022-03-24 08:36:20 +00:00
</div>
2022-03-28 10:37:09 +00:00
{{#if @helper}}
2022-04-26 10:28:40 +00:00
<div class="mt-1 text-sm">
{{@helper}}
</div>
2022-03-28 10:37:09 +00:00
{{/if}}
2022-03-24 08:36:20 +00:00
</div>