Skip to content

Commit

Permalink
Add TypeScript definition file
Browse files Browse the repository at this point in the history
  • Loading branch information
svbutko authored Oct 9, 2018
1 parent e846555 commit e57f22a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
declare module "react-native-hyperlinked-text" {

import {TextStyle} from "react-native";

export interface ILinkDef {
regex: RegExp;
style?: TextStyle;
replaceText?: (orig: string, text: string, url: string) => string;
onPress?: (orig: string, text: string, url: string) => void;
}

interface IProps {
style?: TextStyle;
linkDefs?: ILinkDef[];

}

export default class HyperlinkedText extends React.Component<IProps, any> {
static _openWebUrl(url: string): void;
}
}

0 comments on commit e57f22a

Please sign in to comment.