carbon-components-svelte
Version:
Svelte implementation of the Carbon Design System
32 lines (25 loc) • 804 B
TypeScript
import { SvelteComponentTyped } from "svelte";
import type { SvelteHTMLElements } from "svelte/elements";
type $RestProps = SvelteHTMLElements["div"];
type $Props = {
/**
* Specify the badge count.
* Omit or set to `0` to render an empty dot.
* A numeric count greater than `999` displays as "999+".
* Pass a string to override the displayed value (e.g. `"1.2k"`).
* @default undefined
*/
count?: number | string;
/**
* Obtain a reference to the HTML element.
* @default null
*/
ref?: null | HTMLDivElement;
[key: `data-${string}`]: unknown;
};
export type BadgeIndicatorProps = Omit<$RestProps, keyof $Props> & $Props;
export default class BadgeIndicator extends SvelteComponentTyped<
BadgeIndicatorProps,
Record<string, any>,
Record<string, never>
> {}