nlt2390/react-native-view-more-text
소개
A super lightweight plugin to expand/collapse text in React-Native. Truncated text is ended with dotdotdot.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalreact-native-view-more-text
A super lightweight plugin to expand/collapse text in React-Native. Truncated text is ended with dotdotdot.
Working on IOS/Android

Installation
npm install --save react-native-view-more-text || yarn add react-native-view-more-text
Usage
numberOfLines(number)(*required): Number of lines to be displayed.
renderViewMore(object): Render view-more component
renderViewLess(object): Render view-less component
afterCollapse(func): Callback after collapsing
afterExpand(func): Callback after expanding
onTextLayout(func): onTextLayout function is passed to
TextinsideViewMoreText(Refer to this PR#56)textStyle([object, array]): Styles is passed to
TextinsideViewMoreText(Refer to this PR#8)
import ViewMoreText from 'react-native-view-more-text';
const Screen = () => {
const renderViewMore = (onPress) => <Text onPress={onPress}>View more</Text>;
const renderViewLess = (onPress) => <Text onPress={onPress}>View less</Text>;
return (
//...
<ViewMoreText
numberOfLines={3}
renderViewMore={renderViewMore}
renderViewLess={renderViewLess}
textStyle={{textAlign: 'center'}}
>
<Text>
Lorem ipsum dolor sit amet, in quo dolorum ponderum, nam veri molestie constituto eu. Eum enim tantas sadipscing ne, ut omnes malorum nostrum cum. Errem populo qui ne, ea ipsum antiopam definitionem eos.
</Text>
</ViewMoreText>
//...
);
}
Support
관련 프로젝트 살펴보기
불러오는 중…