Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -24,6 +25,7 @@ export default class Lightbox extends Component {

static defaultProps = {
swipeToDismiss: true,
touchableProps: {},
onOpen: () => {},
didOpen: () => {},
willClose: () => {},
Expand Down Expand Up @@ -129,6 +131,7 @@ export default class Lightbox extends Component {
<TouchableHighlight
underlayColor={this.props.underlayColor}
onPress={this.open}
{...this.props.touchableProps}
>
{this.props.children}
</TouchableHighlight>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down