From e4dd62fd3d1c3664f56364728d4c01cc0781a1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noem=C3=AD=20Bl=C3=A1zquez?= Date: Fri, 5 Jul 2024 12:50:03 +0200 Subject: [PATCH] Refactor imports --- packages/protolib/components/Monaco.tsx | 3 +- .../components/layout/DefaultLayout.tsx | 2 +- .../components/layout/HeaderContents.tsx | 4 +- .../components/layout/PanelLayout.tsx | 86 +++++++++---------- 4 files changed, 49 insertions(+), 46 deletions(-) diff --git a/packages/protolib/components/Monaco.tsx b/packages/protolib/components/Monaco.tsx index 19c224fe6..be230fe7e 100644 --- a/packages/protolib/components/Monaco.tsx +++ b/packages/protolib/components/Monaco.tsx @@ -3,7 +3,8 @@ import Editor, { EditorProps, useMonaco, loader } from '@monaco-editor/react'; import useKeypress from 'react-use-keypress'; import { useThemeSetting } from '@tamagui/next-theme'; import { useTheme } from '@my/ui'; -import { Tinted, useTint } from 'protolib' +import { useTint } from 'protolib/lib/Tints' +import { Tinted } from 'protolib/components/Tinted' type Props = { sourceCode: string, diff --git a/packages/protolib/components/layout/DefaultLayout.tsx b/packages/protolib/components/layout/DefaultLayout.tsx index d4fd69021..a6d1ea1de 100644 --- a/packages/protolib/components/layout/DefaultLayout.tsx +++ b/packages/protolib/components/layout/DefaultLayout.tsx @@ -1,4 +1,4 @@ -import { AppBar, Tinted } from 'protolib' +import { Tinted } from 'protolib/components/Tinted' import { ToastProvider, ToastViewport } from '@tamagui/toast' import { NextSeo } from 'next-seo' import React from 'react' diff --git a/packages/protolib/components/layout/HeaderContents.tsx b/packages/protolib/components/layout/HeaderContents.tsx index 028a6faac..3e36335ab 100644 --- a/packages/protolib/components/layout/HeaderContents.tsx +++ b/packages/protolib/components/layout/HeaderContents.tsx @@ -1,4 +1,6 @@ -import { ThemeToggle, GithubIcon, HeaderLink, NextLink, ColorToggleButton, LogoIcon, Session} from 'protolib' +import { ThemeToggle} from 'protolib/components/ThemeToggle' +import { NextLink} from 'protolib/components/NextLink' +import { ColorToggleButton} from 'protolib/components/ColorToggleButton' import * as React from 'react' import { TooltipGroup, diff --git a/packages/protolib/components/layout/PanelLayout.tsx b/packages/protolib/components/layout/PanelLayout.tsx index 9984f4284..396da3141 100644 --- a/packages/protolib/components/layout/PanelLayout.tsx +++ b/packages/protolib/components/layout/PanelLayout.tsx @@ -1,49 +1,49 @@ import { YStack, ScrollView, XStack, getTokens } from 'tamagui' -import {AppBar} from 'protolib' +import { AppBar } from 'protolib/components/AppBar' -export const PanelLayout = ({panelBgColor=undefined, menuContent, children, SideMenu, Layout, headerContents, HeaderMenu}) => { - const appBarHeight = 55 - const bgPanels = '$bgPanel' - const _panelBgColor = '$bgContent' +export const PanelLayout = ({ panelBgColor = undefined, menuContent, children, SideMenu, Layout, headerContents, HeaderMenu }) => { + const appBarHeight = 55 + const bgPanels = '$bgPanel' + const _panelBgColor = '$bgContent' - return ( - - {headerContents} - - } - sideMenu={{menuContent}} - footer={ - null - // - // - // - }> - {/* */} - - - - {/* */} - - {/* */} - {children} - {/* */} + return ( + - {/* */} - - - {/* */} + > + {headerContents} + + } + sideMenu={{menuContent}} + footer={ + null + // + // + // + }> + {/* */} + + + + {/* */} + + {/* */} + {children} + {/* */} + + + {/* */} + - - ) + {/* */} + + + ) }