import { ReactNative as RN, stylesheet } from "@vendetta/metro/common"; import { semanticColors } from "@vendetta/ui"; import Text from "./Text"; export function BetterTableRowTitle({ title, onPress, icon, padding, }: { title: string; onPress?: () => void; icon?: number; padding?: boolean; }) { const styles = stylesheet.createThemedStyleSheet({ androidRipple: { color: semanticColors.ANDROID_RIPPLE, cornerRadius: 4, } as any, icon: { width: 16, height: 16, marginTop: 1.5, tintColor: semanticColors.TEXT_MUTED, }, }); const UseCompontent = onPress ? RN.Pressable : RN.View; return ( {icon && ( )} {title} ); } export function BetterTableRowGroup({ title, onTitlePress, icon, children, padding, nearby, }: React.PropsWithChildren<{ title?: string | React.ReactNode; onTitlePress?: () => void; icon?: number; padding?: boolean; nearby?: boolean; }>) { const styles = stylesheet.createThemedStyleSheet({ main: { backgroundColor: semanticColors.CARD_BACKGROUND_DEFAULT, borderColor: semanticColors.BORDER_MUTED, borderWidth: 1, borderRadius: 16, overflow: "hidden", flex: 1, }, }); return ( {title ? ( typeof title === "string" ? ( ) : title ) : null} {padding ? ( {children} ) : children} ); }