meilisearch-admin/app/components/button.hbs
Stanislav Romanov e2f2cbc70f Fix button icon
2022-04-27 14:07:57 +03:00

30 lines
620 B
Handlebars

<button
disabled={{this.disabled}}
type={{this.type}}
class="
inline-flex
items-center
px-3
py-2
cursor-pointer
border
border-gray
bg-white
{{if @group "first:rounded-l-md last:rounded-r-md" "rounded-md"}}
text-gray-700
hover:bg-gray-50
focus:outline-none
{{if this.isActive "bg-gray-50"}}
"
{{on "click" this.handleClick}}
...attributes
>
{{#if this.isPending}}
<MdIcon::Loading @spin={{true}} class="mx-1"/>
{{else if @icon}}
<@icon class="mx-1"/>
{{/if}}
{{#if this.text}}
<span class="mx-1">{{this.text}}</span>
{{/if}}
</button>