mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
chore: remove Truncate since it does not exist in Carbon v11
This commit is contained in:
parent
90a0baf676
commit
5833536199
13 changed files with 3 additions and 191 deletions
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"total": 164,
|
||||
"total": 163,
|
||||
"components": [
|
||||
{
|
||||
"moduleName": "Accordion",
|
||||
|
@ -14625,28 +14625,6 @@
|
|||
],
|
||||
"rest_props": { "type": "Element", "name": "ul" }
|
||||
},
|
||||
{
|
||||
"moduleName": "Truncate",
|
||||
"filePath": "src/Truncate/Truncate.svelte",
|
||||
"props": [
|
||||
{
|
||||
"name": "clamp",
|
||||
"kind": "let",
|
||||
"type": "\"end\" | \"front\"",
|
||||
"value": "\"end\"",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"isRequired": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
}
|
||||
],
|
||||
"moduleExports": [],
|
||||
"slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }],
|
||||
"events": [],
|
||||
"typedefs": [],
|
||||
"rest_props": { "type": "Element", "name": "p" }
|
||||
},
|
||||
{
|
||||
"moduleName": "UnorderedList",
|
||||
"filePath": "src/UnorderedList/UnorderedList.svelte",
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
<script>
|
||||
import { Truncate, truncate } from "carbon-components-svelte";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
This utility component wraps the `.bx--text-truncate--*` CSS selectors from [carbon-components](https://github.com/carbon-design-system/carbon/blob/master/packages/components/src/globals/scss/_helper-classes.scss#L11) for single-line text truncation.
|
||||
|
||||
## Default
|
||||
|
||||
By default, text will be clamped at the end of the line. Text is wrapped with a paragraph (`p`) element. Use the [truncate action](#usetruncate) to truncate text in other elements.
|
||||
|
||||
<Truncate>
|
||||
Carbon Components Svelte is a Svelte component library that implements the Carbon Design System, an open source design system by IBM.
|
||||
</Truncate>
|
||||
|
||||
## Clamp front
|
||||
|
||||
Set `clamp` to `"front"` to clamp the text from the front.
|
||||
|
||||
<Truncate clamp="front">
|
||||
Carbon Components Svelte is a Svelte component library that implements the Carbon Design System, an open source design system by IBM.
|
||||
</Truncate>
|
||||
|
||||
## use:truncate
|
||||
|
||||
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.
|
||||
</h4>
|
||||
<h4 use:truncate={{ clamp: "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