mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
breaking(actions): move truncate
action to src/Truncate (#1224)
* breaking: move truncate action to src/Truncate * docs: update truncate docs
This commit is contained in:
parent
62735d6275
commit
9143e50244
10 changed files with 39 additions and 19 deletions
|
@ -1,7 +1,6 @@
|
|||
|
||||
<script>
|
||||
import { Truncate } from "carbon-components-svelte";
|
||||
import { truncate } from "carbon-components-svelte/actions";
|
||||
import { Truncate, truncate } from "carbon-components-svelte";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
|
@ -25,9 +24,7 @@ Set `clamp` to `"front"` to clamp the text from the front.
|
|||
|
||||
### use:truncate
|
||||
|
||||
The `truncate` action can be used on other HTML elements.
|
||||
|
||||
Import path: `import { truncate } from "carbon-components-svelte/actions";`
|
||||
The `truncate` action can be used on plain HTML elements.
|
||||
|
||||
<h4 use:truncate>
|
||||
Carbon Components Svelte is a Svelte component library that implements the Carbon Design System, an open source design system by IBM.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue