docs: update truncate docs

This commit is contained in:
Eric Liu 2022-04-02 12:01:09 -07:00
commit 4724b7a6c2

View file

@ -1,7 +1,6 @@
<script> <script>
import { Truncate } from "carbon-components-svelte"; import { Truncate, truncate } from "carbon-components-svelte";
import { truncate } from "carbon-components-svelte/actions";
import Preview from "../../components/Preview.svelte"; import Preview from "../../components/Preview.svelte";
</script> </script>
@ -25,9 +24,7 @@ Set `clamp` to `"front"` to clamp the text from the front.
### use:truncate ### use:truncate
The `truncate` action can be used on other HTML elements. The `truncate` action can be used on plain HTML elements.
Import path: `import { truncate } from "carbon-components-svelte/actions";`
<h4 use:truncate> <h4 use:truncate>
Carbon Components Svelte is a Svelte component library that implements the Carbon Design System, an open source design system by IBM. Carbon Components Svelte is a Svelte component library that implements the Carbon Design System, an open source design system by IBM.