Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

787 B
Raw Blame
---
interface Props {
  size?: "md" | "lg";
  block?: boolean;
  style?: "outline" | "primary" | "inverted";
  class?: string;
  [x: string]: any;
}

const {
  size = "md",
  style = "primary",
  block,
  class: className,
  ...rest
} = Astro.props;

const sizes = {
  md: "px-5 py-2.5",
  lg: "px-6 py-3",
};

const styles = {
  outline: "border border-brand-border text-brand-text hover:bg-brand-soft",
  primary:
    "bg-brand text-white hover:bg-brand-hover border border-transparent shadow-[0_12px_30px_-18px_rgb(var(--edgeever-brand-rgb)/0.8)]",
};
---

<button
  {...rest}
  class:list={[
    "rounded-sm text-center transition focus-visible:ring-2 ring-offset-2 ring-gray-200",
    block && "w-full",
    sizes[size],
    styles[style],
    className,
  ]}
  ><slot />
</button>