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.
46 lines (45 loc) • 1.2 kB
TypeScript
import type { Snippet } from 'svelte';
import type { HTMLAnchorAttributes } from 'svelte/elements';
import type { Component } from 'svelte';
interface ListGroupItemType {
name: string;
Icon?: Component;
onclick?: () => void;
href?: string;
active?: boolean;
current?: boolean;
disabled?: boolean;
[key: string]: any;
}
interface ListgroupProps {
children?: Snippet;
items?: (ListGroupItemType | string)[];
active?: boolean;
onclick?: (event?: MouseEvent) => void;
rounded?: boolean;
border?: boolean;
class?: string;
itemClass?: string;
aClasss?: string;
btnClass?: string;
iconClass?: string;
}
interface ListgroupItemProps extends HTMLAnchorAttributes {
children: Snippet;
onclick?: (event?: MouseEvent) => void;
active?: boolean;
current?: boolean;
disabled?: boolean;
name?: string;
Icon?: Component;
href?: string;
currentClass?: string;
normalClass?: string;
disabledClass?: string;
liClass?: string;
class?: string;
aClasss?: string;
btnClass?: string;
iconClass?: string;
}
export { type ListgroupProps, type ListgroupItemProps, type ListGroupItemType };