Skip to content

Commit

Permalink
chore: update docs of visibleLine
Browse files Browse the repository at this point in the history
  • Loading branch information
chenquincy committed Jun 7, 2024
1 parent 24d8f5d commit 2852fc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/src/start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,14 @@ which will lead to compute maxLine error.

## show n lines when more than m lines

show all content lines if the count of content line small than `maxLine`, or show `visibleLine` line of content.

<Playground>
<Ellipsis
text="A high performance and customized ellipsis component for react. Support to custom ellipsis char, ellipsis html, end char filter, reflow callback, ...etc."
maxLine="2"
visibleLine="1"
reflowOnResize={true}
/>
</Playground>

Expand Down
4 changes: 3 additions & 1 deletion docs/src/zh/start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@ import Ellipsis from 'react-ellipsis-component';

## 超过 n 行显示 m 行

内容少于 `maxLine` 行时显示全部内容,超过时显示 ``visibleLine` 行内容

<Playground>
<Ellipsis
text="高性能、可自定义的 react 文本缩略组件。支持自定义缩略符、html 自定义缩略符、尾文本过滤、缩略回调等功能。高性能、可自定义的 react 文本缩略组件。支持自定义缩略符、html 自定义缩略符、尾文本过滤、缩略回调等功能。"
maxLine="2"
visibleLine="1"
ellipsisNode=" ...查看更多"
reflowOnResize={true}
/>
</Playground>

Expand Down

0 comments on commit 2852fc1

Please sign in to comment.