<script lang="ts">
  import Icon from "./Icon.svelte";

  type BtnSize = "sm" | "md";

  export let path: string;
  export let size: BtnSize = "sm";
  export let cls = "";
  export let title: undefined | string = undefined;
  export let ariaPressed: undefined | boolean = undefined;
  export let tabindex: undefined | number = undefined;
</script>

<button
  class={`btn btn-ghost btn-circle ${
    size === "md" ? "" : "btn-" + size
  } ${cls}`}
  aria-pressed={ariaPressed}
  {tabindex}
  {title}
  on:click
>
  <Icon {path} size={size === "md" ? 2 : 1.5} />
</button>
