feat(truncate): integrate Truncate with v11

This commit is contained in:
Eric Liu 2024-04-21 12:56:28 -07:00
commit 6c2d416721
8 changed files with 57 additions and 41 deletions

View file

@ -1,12 +1,9 @@
import type { Action } from "svelte/action";
interface TruncateOptions {
clamp?: "end" | "front";
}
export function TruncateAction(
node: HTMLElement,
options?: TruncateOptions
): {
update: (options?: TruncateOptions) => void;
};
export declare const truncate: Action<HTMLElement, TruncateOptions>;
export default TruncateAction;
export default truncate;