meilisearch-admin/app/components/button.hbs

29 lines
565 B
Handlebars
Raw Normal View History

2022-03-27 13:04:08 +00:00
<button
disabled={{this.disabled}}
type={{this.type}}
2022-03-30 06:58:35 +00:00
class="
inline-flex
items-center
px-3
py-2
cursor-pointer
border
2022-04-13 08:26:24 +00:00
border-gray
2022-03-30 06:58:35 +00:00
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"}}
"
2022-03-27 13:04:08 +00:00
{{on "click" this.handleClick}}
2022-03-30 06:58:35 +00:00
...attributes
2022-03-27 13:04:08 +00:00
>
{{#if this.icon}}
<MdIcon @icon={{this.icon}} class="mx-1"/>
{{/if}}
{{#if this.text}}
<span class="mx-1">{{this.text}}</span>
{{/if}}
</button>