Skip to content

Commit e45a397

Browse files
TomJamesDuffyoblador
authored andcommitted
Lightbox can receive onLongPress function as a prop. (#108)
* Included onLongPress * Lightbox can now handle onLongPress event * Adjusted default behaviour to null * Move onLongPress to static defaultProps * Renamed package * Revert name change
1 parent 685bb58 commit e45a397

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lightbox.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export default class Lightbox extends Component {
2828
didOpen: () => {},
2929
willClose: () => {},
3030
onClose: () => {},
31+
onLongPress: () => {},
3132
};
3233

3334
state = {
@@ -129,6 +130,7 @@ export default class Lightbox extends Component {
129130
<TouchableHighlight
130131
underlayColor={this.props.underlayColor}
131132
onPress={this.open}
133+
onLongPress={this.props.onLongPress}
132134
>
133135
{this.props.children}
134136
</TouchableHighlight>

0 commit comments

Comments
 (0)