pucker of the text content when exceed the specified scope
npm install rn-pucker折叠器组件主要实现当文本超过设定的行数的时候,自动折叠,当点击下拉按钮的时候自动展开,再次点击的时候会自动收起;
当文本少于设定行数时候,不会有下拉按钮。
注意: 组件中的arrow是图片,实际应用可以替换为iconfont,欢迎PR。
``bash`
npm install rn-pucker --save
`js
import Pucker from 'rn-pucker';
let content = "Font Awesome CDN is the easiest way to get Font Awesome on your website or app, " +
"all with just a single line of code. No downloading or installing!Want to manage and host Font Awesome assets yourself? " +
"You can download, customize, and use the icons and default styling manually. " +
"Both CSS and CSS Preprocessor (Sass and Less) formats are included.";
export default ({}) => {
return (
)
}
``

