🎥 Make videos programmatically with React
Make explorer and opiton panel responsive
Chetan Karwa855d2ae17ba6
diff --git a/packages/studio/src/components/MobilePanel.tsx b/packages/studio/src/components/MobilePanel.tsxnew file mode 100644index 0000000000..6dac9303f8--- /dev/null+++ b/packages/studio/src/components/MobilePanel.tsx@@ -0,0 +1,51 @@+import ReactDOM from 'react-dom';+import {BACKGROUND} from '../helpers/colors';+import {useZIndex} from '../state/z-index';+import {CancelButton} from './NewComposition/CancelButton';++export default function MobilePanel({+ children,+ onClose,+ portal,+}: {+ children: React.ReactNode;+ onClose: () => void;+ portal: Element;+}) {+ const {currentZIndex} = useZIndex();++ return ReactDOM.createPortal(+ <div+ style={{+ position: 'fixed',+ top: 0,+ left: 0,+ width: '100%',+ height: '100%',+ padding: '0 10px 50px 10px',+ background: BACKGROUND,+ zIndex: currentZIndex + 1,+ }}+ >+ <div+ style={{+ height: '40px',+ width: '100%',+ alignItems: 'center',+ display: 'flex',+ justifyContent: 'flex-end',+ }}+ >+ <CancelButton+ style={{+ height: 20,+ width: 20,+ }}+ onPress={onClose}+ />+ </div>+ {children}+ </div>,+ portal,+ );+}