Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarlosn committed Jul 5, 2024
2 parents 4d9a702 + c73c170 commit a85967c
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 46 deletions.
3 changes: 2 additions & 1 deletion packages/protolib/components/Monaco.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/protolib/components/layout/DefaultLayout.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
4 changes: 3 additions & 1 deletion packages/protolib/components/layout/HeaderContents.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
86 changes: 43 additions & 43 deletions packages/protolib/components/layout/PanelLayout.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<Layout
header={
<AppBar
height={appBarHeight}
fullscreen={true}
dettached={false}
translucid={false}
position="top"
backgroundColor={bgPanels}

>
<XStack ml={"$5"} justifyContent="space-between" f={1}>{headerContents}</XStack>
</AppBar>
}
sideMenu={<SideMenu mt={appBarHeight} sideBarColor={bgPanels}>{menuContent}</SideMenu>}
footer={
null
// <AppBar dettached={false} translucid={false} position="bottom">
// <HeaderContents menuPlacement={"top"} />
// </AppBar>
}>
{/* <Theme name={tint as any}> */}
<XStack f={1} p="$3" pl={0} bc={bgPanels}>
<XStack bc={bgPanels} elevation={3} br={"$6"} mt={appBarHeight} f={1} height={'calc(100vh - '+(appBarHeight+30)+'px)'}>
<ScrollView $sm={{br:"$0"}} height={'calc(100vh - '+(appBarHeight+30)+'px)'}>
{/* <Tinted> */}
<YStack br={"$6"} bc={panelBgColor ?? _panelBgColor} f={1} minHeight={'calc(100vh - '+(appBarHeight+30)+'px)'} flex={1}>
{/* <Theme reset> */}
{children}
{/* </Theme> */}
return (
<Layout
header={
<AppBar
height={appBarHeight}
fullscreen={true}
dettached={false}
translucid={false}
position="top"
backgroundColor={bgPanels}

</YStack>
{/* </Tinted> */}
</ScrollView>
</XStack>
{/* </Theme> */}
>
<XStack ml={"$5"} justifyContent="space-between" f={1}>{headerContents}</XStack>
</AppBar>
}
sideMenu={<SideMenu mt={appBarHeight} sideBarColor={bgPanels}>{menuContent}</SideMenu>}
footer={
null
// <AppBar dettached={false} translucid={false} position="bottom">
// <HeaderContents menuPlacement={"top"} />
// </AppBar>
}>
{/* <Theme name={tint as any}> */}
<XStack f={1} p="$3" pl={0} bc={bgPanels}>
<XStack bc={bgPanels} elevation={3} br={"$6"} mt={appBarHeight} f={1} height={'calc(100vh - ' + (appBarHeight + 30) + 'px)'}>
<ScrollView $sm={{ br: "$0" }} height={'calc(100vh - ' + (appBarHeight + 30) + 'px)'}>
{/* <Tinted> */}
<YStack br={"$6"} bc={panelBgColor ?? _panelBgColor} f={1} minHeight={'calc(100vh - ' + (appBarHeight + 30) + 'px)'} flex={1}>
{/* <Theme reset> */}
{children}
{/* </Theme> */}

</YStack>
{/* </Tinted> */}
</ScrollView>
</XStack>
</Layout>
)
{/* </Theme> */}
</XStack>
</Layout>
)
}

0 comments on commit a85967c

Please sign in to comment.