Getting started
UI
W.Feature
Widget
All types exported by the library. You can access them like this:
import type { ToAction } from '@yatoday/astro-ui';
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;
};
export type NameValue = {
name?: string;
value?: string;
};
export type Image = {
src: string;
alt?: string;
aspectRatio?: string;
};
Item for the Testimonials widget component
export type Testimonial = {
title?: string;
text?: string;
author?: string;
authorDescription?: string;
image?: string | Image;
callToAction?: ToAction;
};
export type Item = {
title?: string;
description?: string;
icon?: string;
classes?: Record<string, string>;
callToAction?: CallToAction;
image?: Image | string;
}