Skip to content

Commit f9ceff5

Browse files
Joseph Smithjoshswan
Joseph Smith
authored andcommitted
Fix phone propTypes (#33)
Now that the `phone` prop can support the string "text" to open up in messages instead of attempt to phone the number the propType needs to change to support both booleans and string.
1 parent 3c3e507 commit f9ceff5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ Autolink.propTypes = {
299299
numberOfLines: PropTypes.number,
300300
onPress: PropTypes.func,
301301
onLongPress: PropTypes.func,
302-
phone: PropTypes.bool,
302+
phone: PropTypes.oneOfType([
303+
PropTypes.bool,
304+
PropTypes.string,
305+
]),
303306
renderLink: PropTypes.func,
304307
showAlert: PropTypes.bool,
305308
stripPrefix: PropTypes.bool,

0 commit comments

Comments
 (0)