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

24 lines
548 B
Handlebars
Raw Normal View History

2022-09-02 09:50:33 +00:00
<Form::Element
@label={{@label}}
@for={{this.id}}
@required={{@required}}
@helper={{@helper}}
2022-09-11 07:46:17 +00:00
...attributes
2022-09-02 09:50:33 +00:00
>
2022-09-09 15:36:23 +00:00
<div class='relative flex items-center border rounded'>
2022-03-24 08:36:20 +00:00
{{#if @prefixIcon}}
2022-09-02 09:50:33 +00:00
<@prefixIcon class='h-8 w-8 pl-2' />
2022-03-24 08:36:20 +00:00
{{/if}}
<input
2022-09-02 09:50:33 +00:00
type='text'
2022-03-24 08:36:20 +00:00
name={{@name}}
id={{this.id}}
2022-09-02 09:50:33 +00:00
class='block w-full p-2 bg-transparent focus:outline-none'
2022-03-24 08:36:20 +00:00
placeholder={{@placeholder}}
value={{@value}}
2022-08-20 15:11:49 +00:00
required={{@required}}
2022-03-24 08:36:20 +00:00
{{on 'input' this.onChange}}
2022-04-26 10:28:40 +00:00
/>
2022-03-24 08:36:20 +00:00
</div>
2022-09-02 09:50:33 +00:00
</Form::Element>