Skip to content

Typescript error: Type '{children: Element[]; handle: FullScreenHandle; onChange: (state: boolean) => void;}' is not assignable to type 'IntrinsicAttributes & FullScreenProps' #99

@demostheneslld

Description

@demostheneslld

I believe this can be fixed by adding a simple children: React.ReactNode; to export interface FullScreenProps

// index.d.ts
import React from 'react';
export interface FullScreenHandle {
    active: boolean;
    enter: () => Promise<void>;
    exit: () => Promise<void>;
    node: React.MutableRefObject<HTMLDivElement | null>;
}
export interface FullScreenProps {
    handle: FullScreenHandle;
    onChange?: (state: boolean, handle: FullScreenHandle) => void;
    children: React.ReactNode;
    className?: string;
}
export declare function useFullScreenHandle(): FullScreenHandle;
export declare const FullScreen: React.FC<FullScreenProps>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions