Skip to content

Commit

Permalink
Implement component type (#50)
Browse files Browse the repository at this point in the history
* Implement index.d.ts

* Update package.json

- Remove devDependencies
- Upgrade version 2.2.2 -> 2.3.0
  • Loading branch information
KoreanThinker authored Dec 30, 2021
1 parent 324fecc commit 618d934
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
27 changes: 27 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import { StyleProp, TextStyle, ViewStyle, LayoutChangeEvent, NativeSyntheticEvent, TextLayoutEventData } from 'react-native';

export interface ReadMoreProps {
style?: StyleProp<TextStyle>;
seeMoreStyle?: StyleProp<TextStyle>;
seeLessStyle?: StyleProp<TextStyle>;
wrapperStyle?: StyleProp<ViewStyle>;
children?: React.ReactNode;
numberOfLines?: number;
seeMoreText?: string;
seeLessText?: string;
animate?: boolean;
customTextComponent?: React.ReactNode;
ellipsis?: string;
allowFontScaling?: boolean;
onExpand?: () => void;
onCollapse?: () => void;
expandOnly?: boolean;
seeMoreOverlapCount?: number;
debounceSeeMoreCalc?: number;
onLayout?: (event: LayoutChangeEvent) => void;
onTextLayout?: (event: NativeSyntheticEvent<TextLayoutEventData>) => void;
onReady?: () => void;
}
declare const ReadMore: React.FC<ReadMoreProps>;
export default ReadMore;
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "@fawazahmed/react-native-read-more",
"version": "2.2.2",
"version": "2.3.0",
"description": "A simple react native library to show large blocks of text in a condensed manner with the ability to collapse and expand.",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 618d934

Please sign in to comment.