Skip to content

Missing children in Lightbox typeΒ #11

@kestarumper

Description

@kestarumper

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

Problem

The exported Lightbox type is not supporting React children

Diff

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-lightbox-v2/dist/Lightbox.d.ts b/node_modules/react-native-lightbox-v2/dist/Lightbox.d.ts
index 984e8ae..38a52f2 100644
--- a/node_modules/react-native-lightbox-v2/dist/Lightbox.d.ts
+++ b/node_modules/react-native-lightbox-v2/dist/Lightbox.d.ts
@@ -12,7 +12,7 @@ export interface ISpringConfig {
     tension: number;
     friction: number;
 }
-export interface LightboxProps<T = any> extends IGestureProps {
+export interface LightboxProps<T = any> extends React.PropsWithChildren<IGestureProps> {
     activeProps?: Record<string, T>;
     renderContent?: Func<T, JSX.Element>;
     renderHeader?: Func<T, JSX.Element>;

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions