feat(truncate): add text truncation component and action

This commit is contained in:
Eric Liu 2021-02-19 07:40:19 -08:00
commit a51c300a79
13 changed files with 161 additions and 3 deletions

16
types/Truncate/Truncate.d.ts vendored Normal file
View file

@ -0,0 +1,16 @@
/// <reference types="svelte" />
import { SvelteComponentTyped } from "svelte";
export interface TruncateProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
/**
* @default "end"
*/
direction?: "end" | "front";
}
export default class Truncate extends SvelteComponentTyped<
TruncateProps,
{},
{ default: {} }
> {}

1
types/index.d.ts vendored
View file

@ -133,6 +133,7 @@ export { default as ToggleSmallSkeleton } from "./ToggleSmall/ToggleSmallSkeleto
export { default as Tooltip } from "./Tooltip/Tooltip";
export { default as TooltipDefinition } from "./TooltipDefinition/TooltipDefinition";
export { default as TooltipIcon } from "./TooltipIcon/TooltipIcon";
export { default as Truncate } from "./Truncate/Truncate";
export { default as Header } from "./UIShell/GlobalHeader/Header";
export { default as HeaderAction } from "./UIShell/GlobalHeader/HeaderAction";
export { default as HeaderActionLink } from "./UIShell/GlobalHeader/HeaderActionLink";