0.6.13

Types

All types exported by the library. You can access them like this:

import type { ToAction } from '@yatoday/astro-ui';

Action Buttons

All buttons have this type of parameters

import {HTMLAttributes} from "astro/types"; 

export type ToAction = {
  variant?: 'default' | 'primary' | 'accent' | 'destructive' | 'outline' | 'ghost' | 'link';
  size?: 'default' | 'sm' | 'lg' | 'icon';
  text?: string;
  icon?: string;
  classes?: Record<string, string>;
  type?: 'button' | 'submit' | 'reset';
} & Omit<HTMLAttributes<'a'>, 'slot'>;
export type Link = {
  href?: string;
  text?: string;
};

NameValue

export type NameValue = {
  name?: string;
  value?: string;
};

Image

export type Image = {
  src: string;
  alt?: string;
  aspectRatio?: string;
};

Testimonial

Item for the Testimonials widget component

export type Testimonial = {
  title?: string;
  text?: string;
  author?: string;
  authorDescription?: string;
  image?: string | Image;
  callToAction?: ToAction;
};

Item

export type Item = {
  title?: string;
  description?: string;
  icon?: string;
  classes?: Record<string, string>;
  callToAction?: CallToAction;
  image?: Image | string;
}