m3-svelte
Version:
M3 Svelte implements the Material 3 design system in Svelte. See the [website](https://kendell.dev/m3-svelte/) for demos and usage instructions.
28 lines (27 loc) • 1.34 kB
TypeScript
import type { Snippet } from "svelte";
import type { IconifyIcon } from "@iconify/types";
import type { AnchorAttrs, ButtonAttrs, NotLink } from "../misc/typing-utils";
import type { HTMLLabelAttributes } from "svelte/elements";
type ActionProps = AnchorAttrs | (NotLink<HTMLLabelAttributes> & {
label: true;
}) | ButtonAttrs;
type $$ComponentProps = {
/**
* general is filter/suggestion since they're the same.
* | name | use | example | phrasing |
* |------------|------------------|-------------------------------|--------------------|
* | input | information item | like a person in the to field | user-entered thing |
* | assist | smart actions | like add to calendar | start with a verb |
* | filter | selection | like in a search page | category |
* | suggestion | smart actions | like a chat response | query/message |
*/
variant: "input" | "assist" | "general";
icon?: IconifyIcon | undefined;
trailingIcon?: IconifyIcon | undefined;
elevated?: boolean;
selected?: boolean;
children: Snippet;
} & ActionProps;
declare const Chip: import("svelte").Component<$$ComponentProps, {}, "">;
type Chip = ReturnType<typeof Chip>;
export default Chip;