Skip to content

Commit

Permalink
fix(types): PropsWithChildren type argument issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mertJF committed Nov 18, 2024
1 parent 65bcb7e commit c7a151e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/calendar_container.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from "react";

export interface CalendarContainerProps extends React.PropsWithChildren {
export interface CalendarContainerProps
extends React.PropsWithChildren<HTMLDivElement> {
showTimeSelectOnly?: boolean;
showTime?: boolean;
className?: string;
}

const CalendarContainer: React.FC<CalendarContainerProps> = function ({
Expand Down
3 changes: 2 additions & 1 deletion src/popper_component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import TabLoop from "./tab_loop";
import withFloating from "./with_floating";

import type { FloatingProps } from "./with_floating";
import type { ReactNode } from "react";

interface PortalProps
extends Omit<React.ComponentPropsWithoutRef<typeof Portal>, "children"> {}
Expand All @@ -20,7 +21,7 @@ interface PopperComponentProps
className?: string;
wrapperClassName?: string;
popperComponent: React.ReactNode;
popperContainer?: React.FC<React.PropsWithChildren>;
popperContainer?: React.FC<{ children?: ReactNode | undefined }>;
targetComponent: React.ReactNode;
popperOnKeyDown: React.KeyboardEventHandler<HTMLDivElement>;
showArrow?: boolean;
Expand Down
5 changes: 4 additions & 1 deletion src/tab_loop.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import React, { Component, createRef } from "react";

interface TabLoopProps extends React.PropsWithChildren {
import type { ReactNode } from "react";

interface TabLoopProps {
enableTabLoop?: boolean;
children?: ReactNode | undefined;
}

const focusableElementsSelector =
Expand Down

0 comments on commit c7a151e

Please sign in to comment.