---
export interface Props {
  href: string;
  download?: astroHTML.JSX.AnchorHTMLAttributes['download'];
}

const { href, download } = Astro.props;

const classes = /* tw */ {
  main: 'inline-flex items-center px-4 h-10 text-base font-medium rounded-md shadow-sm text-white bg-primary-600 select-none cursor-pointer',
  hover: 'hover:bg-primary-700',
  active: 'active:translate-y-px',
  focus: 'focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500',
};
---

<a href={href} class:list={[classes.main, classes.hover, classes.active, classes.focus]} download={download}>
  <slot />
</a>
