feat: add PowerInput component
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
c864a1062d
commit
d06f21c927
14
packages/web/src/components/Portal/index.tsx
Normal file
14
packages/web/src/components/Portal/index.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import * as React from 'react'
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
type PortalProps = {
|
||||
children: React.ReactElement;
|
||||
};
|
||||
|
||||
const Portal = ({ children }: PortalProps) => {
|
||||
return typeof document === 'object'
|
||||
? ReactDOM.createPortal(children, document.body)
|
||||
: null
|
||||
}
|
||||
|
||||
export default Portal;
|
Reference in New Issue
Block a user