Skip to content

Commit 1538d71

Browse files
authored
[docs] Updates to Text LineClamp (#511)
* Update +page.md Adds clarity for lineClamp * Update Text.demo.clamp.svelte Extends lineClamp value to include 0.
1 parent bd505e6 commit 1538d71

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

apps/docs/src/routes/core/text/+page.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ Specify maximum amount of lines with `lineClamp` prop. This option uses [-webkit
6161

6262
<Demo demo={TextDemos.clamp} />
6363

64+
- `lineClamp={0}` will show all the associated text.
65+
6466
## Inherit Styles
6567

6668
Text always applies font-size, font-family and line-height styles, but in some cases this is not a desired behavior. To force Text to inherit parent styles set `inherit` prop. For example, highlight part of [Title]({base}/core/title):

packages/svelteui-demos/src/demos/core/Text/Text.demo.clamp.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
codeTemplate,
1717
configurator: [
1818
{ name: 'size', type: 'size', initialValue: 'md', defaultValue: 'md' },
19-
{ name: 'lineClamp', label: 'Line clamp', type: 'number', initialValue: 4, min: 1, max: 5 }
19+
{ name: 'lineClamp', label: 'Line clamp', type: 'number', initialValue: 4, min: 0, max: 5 }
2020
]
2121
};
2222
</script>

0 commit comments

Comments
 (0)