From 406f578f09debb2f451d843c8ff30e935cda25f5 Mon Sep 17 00:00:00 2001 From: Bilal Syed Date: Sun, 21 Jan 2018 17:17:30 +0300 Subject: [PATCH 1/2] Add touchableProps --- Lightbox.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lightbox.js b/Lightbox.js index 56c8536..68e43c1 100644 --- a/Lightbox.js +++ b/Lightbox.js @@ -7,6 +7,7 @@ import LightboxOverlay from './LightboxOverlay'; export default class Lightbox extends Component { static propTypes = { activeProps: PropTypes.object, + touchableProps: PropTypes.object, renderHeader: PropTypes.func, renderContent: PropTypes.func, underlayColor: PropTypes.string, @@ -24,6 +25,7 @@ export default class Lightbox extends Component { static defaultProps = { swipeToDismiss: true, + touchableProps: {}, onOpen: () => {}, didOpen: () => {}, willClose: () => {}, @@ -129,6 +131,7 @@ export default class Lightbox extends Component { {this.props.children} From 8532025e1737f65efb54fa79979956326bd4362e Mon Sep 17 00:00:00 2001 From: Bilal Syed Date: Sun, 21 Jan 2018 18:19:03 +0300 Subject: [PATCH 2/2] Updated README with new touchableProps --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6bc4ffe..231895d 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ const MyApp = () => ( | Prop | Type | Description | |---|---|---| |**`activeProps`**|`object`|Optional set of props applied to the content component when in lightbox mode. Usable for applying custom styles or higher resolution image source.| +|**`touchableProps`**|`object`|Optional set of props applied to the touchable component. Usable for applying advance props such as onLongPress.| |**`renderHeader(close)`**|`function`|Custom header instead of default with X button| |**`renderContent`**|`function`|Custom lightbox content instead of default child content| |**`willClose`**|`function`|Triggered before lightbox is closed|