Skip to content

Commit

Permalink
fix: fix portal component ts issue
Browse files Browse the repository at this point in the history
  • Loading branch information
swiiny committed Jan 1, 2024
1 parent 3c2dfe5 commit aae5c5d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 15 deletions.
4 changes: 2 additions & 2 deletions packages/base/components/common/Portal/Portal.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { FC, useEffect, useRef, useState } from 'react';
import { FC, PropsWithChildren, useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import { IPortal } from './Portal.type';

// client only portal
const Portal: FC<IPortal> = ({ children, selector }) => {
const Portal: FC<PropsWithChildren<IPortal>> = ({ children, selector }) => {
const ref = useRef<any | undefined>();
const [mounted, setMounted] = useState<boolean>(false);

Expand Down
3 changes: 0 additions & 3 deletions packages/base/components/common/Portal/Portal.type.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { ReactNode } from 'react';

interface IPortal {
children: ReactNode;
selector: string;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/mui/components/common/Portal/Portal.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { FC, useEffect, useRef, useState } from 'react';
import { FC, PropsWithChildren, useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import { IPortal } from './Portal.type';

// client only portal
const Portal: FC<IPortal> = ({ children, selector }) => {
const Portal: FC<PropsWithChildren<IPortal>> = ({ children, selector }) => {
const ref = useRef<any | undefined>();
const [mounted, setMounted] = useState<boolean>(false);

Expand Down
3 changes: 0 additions & 3 deletions packages/mui/components/common/Portal/Portal.type.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { ReactNode } from 'react';

interface IPortal {
children: ReactNode;
selector: string;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/tailwind/components/common/Portal/Portal.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { FC, useEffect, useRef, useState } from 'react';
import { FC, PropsWithChildren, useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import { IPortal } from './Portal.type';

// client only portal
const Portal: FC<IPortal> = ({ children, selector }) => {
const Portal: FC<PropsWithChildren<IPortal>> = ({ children, selector }) => {
const ref = useRef<any | undefined>();
const [mounted, setMounted] = useState<boolean>(false);

Expand Down
3 changes: 0 additions & 3 deletions packages/tailwind/components/common/Portal/Portal.type.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { ReactNode } from 'react';

interface IPortal {
children: ReactNode;
selector: string;
}

Expand Down

0 comments on commit aae5c5d

Please sign in to comment.