mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
feat(truncate): add text truncation component and action
This commit is contained in:
parent
735c6a7f7e
commit
a51c300a79
13 changed files with 161 additions and 3 deletions
23
tests/Truncate.test.svelte
Normal file
23
tests/Truncate.test.svelte
Normal file
|
@ -0,0 +1,23 @@
|
|||
<script lang="ts">
|
||||
import { Truncate } from "../types";
|
||||
import { truncate } from "../actions";
|
||||
</script>
|
||||
|
||||
<Truncate>
|
||||
Carbon Components Svelte is a Svelte component library that implements the
|
||||
Carbon Design System, an open source design system by IBM.
|
||||
</Truncate>
|
||||
|
||||
<Truncate direction="front">
|
||||
Carbon Components Svelte is a Svelte component library that implements the
|
||||
Carbon Design System, an open source design system by IBM.
|
||||
</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.
|
||||
</h4>
|
||||
<h4 use:truncate="{{ direction: 'front' }}">
|
||||
Carbon Components Svelte is a Svelte component library that implements the
|
||||
Carbon Design System, an open source design system by IBM.
|
||||
</h4>
|
Loading…
Add table
Add a link
Reference in a new issue