Skip to content

Commit 57545f9

Browse files
author
Kashish Grover
committed
docs: updated readme
1 parent 6e7ee7e commit 57545f9

File tree

5 files changed

+32
-10
lines changed

5 files changed

+32
-10
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ import SeeMore from 'react-native-see-more-inline';
2121
<SeeMore numberOfLines={2}>
2222
{VERY_LARGE_TEXT}
2323
</SeeMore>
24+
25+
<SeeMore numberOfLines={2} linkStyle={{ fontWeight: '500' }}>
26+
{VERY_LARGE_TEXT}
27+
</SeeMore>
2428
```
2529

2630
### Props
@@ -29,6 +33,7 @@ import SeeMore from 'react-native-see-more-inline';
2933
| numberOfLines | - | yes | number |
3034
| linkColor | '#2E75F0' | no | string |
3135
| linkPressedColor | '#163772' | no | string |
36+
| linkStyle | undefined | no | array/object |
3237
| seeMoreText | 'see more' | no | string |
3338
| seeLessText | 'see less' | no | string |
3439
| style | `{ fontFamily: undefined, fontSize: 14, fontWeight: '300' }` | no | array/object |

images/screenshot1.png

97.4 KB
Loading

images/screenshot2.png

79.2 KB
Loading

images/screenshot3.png

11.1 KB
Loading

index.d.ts

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,36 @@
11
declare module 'react-native-see-more-inline' {
22
import { ComponentClass, ReactElement } from 'react';
3+
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
34

45
export type SeeMoreProps = {
6+
/**
7+
* Number of lines to limit the text to
8+
*/
59
numberOfLines: number;
6-
linkColor: string;
7-
10+
/**
11+
* Color of the see more/see less link
12+
*/
13+
linkColor?: string;
14+
/**
15+
* Color of the see more/see less link when it is being pressed
16+
*/
817
linkPressedColor?: string;
9-
10-
seeMoreTextStyle?: StyleProp<TextStyle>;
11-
seeLessTextStyle?: StyleProp<TextStyle>;
12-
13-
seeMoreText?: string | ReactElement;
14-
seeLessText?: string | ReactElement;
15-
16-
style?: StyleProp<ViewStyle>;
18+
/**
19+
* Extra styles for the see more/see less link if any
20+
*/
21+
linkStyle?: StyleProp<TextStyle>;
22+
/**
23+
* String value to override "see more" text
24+
*/
25+
seeMoreText?: string;
26+
/**
27+
* String value to override "see less" text
28+
*/
29+
seeLessText?: string;
30+
/**
31+
* Style of the base text
32+
*/
33+
style?: StyleProp<TextStyle>;
1734
};
1835

1936
const SeeMore: ComponentClass<SeeMoreProps>;

0 commit comments

Comments
 (0)