refactor: fix table and clean up auth code

This commit is contained in:
Max Koon
2025-11-20 11:53:31 -05:00
parent b42da83274
commit 882d437007
8 changed files with 118 additions and 58 deletions

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import type { ViewProps, TextProps, PressableProps } from "react-native";
import type { ViewProps, TextProps, PressableProps, ScrollViewProps } from "react-native";
export function View({ children, style }: ViewProps) {
const bg = style &&
@@ -20,8 +20,26 @@ export function View({ children, style }: ViewProps) {
? style.flex
: undefined
: undefined;
const flexShrink = style &&
'flexShrink' in style
? typeof style.flexShrink == 'number'
? style.flexShrink
: undefined
: undefined;
const overflow = style &&
'overflow' in style
? typeof style.overflow == 'string'
? style.overflow
: undefined
: undefined;
return <box backgroundColor={bg} flexDirection={flexDirection} flexGrow={flex}>{children}</box>
return <box
backgroundColor={bg}
flexDirection={flexDirection}
flexGrow={flex}
overflow={overflow}
flexShrink={flexShrink}
>{children}</box>
}
export function Pressable({ children: childrenRaw, style, onPress }: PressableProps) {
@@ -69,6 +87,10 @@ export function Text({ style, children }: TextProps) {
}
export function ScrollView({ children }: ScrollViewProps) {
return <scrollbox >{children}</scrollbox>
}
export const Platform = {
OS: "tui",
};