meilisearch-admin/app/components/button.hbs
Stanislav Romanov 920e4b0d2c Refactore icons
2022-04-26 13:28:40 +03:00

28 lines
548 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.icon}}
<this.icon class="mx-1"/>
{{/if}}
{{#if this.text}}
<span class="mx-1">{{this.text}}</span>
{{/if}}
</button>