svelte-5-ui-lib
Version:
Svelte 5 UI Lib is a UI library built from scratch to leverage Svelte 5's runes system, creating smooth, reactive components.
23 lines (22 loc) • 916 B
TypeScript
import type { Snippet } from 'svelte';
import type { ParamsType, TransitionFunc } from '../types';
import type { HTMLAttributes, HTMLAnchorAttributes } from 'svelte/elements';
type BadgeColorType = 'primary' | 'secondary' | 'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose';
interface BadgeProps extends HTMLAttributes<HTMLDivElement> {
children: Snippet;
icon?: Snippet;
badgeStatus?: boolean;
color?: BadgeColorType;
large?: boolean;
dismissable?: boolean;
border?: boolean;
href?: HTMLAnchorAttributes['href'];
target?: HTMLAnchorAttributes['target'];
rounded?: boolean;
transition?: TransitionFunc;
params?: ParamsType;
onclick?: () => void;
aClass?: string;
class?: string;
}
export { type BadgeProps, type BadgeColorType };