Files
zooqueenandHanzo Dev 91da549471 feat(app): scaffold lux cross-platform app (Expo+Tauri) on @hanzo/gui
Phase 1: rebranded @hanzogui/expo-router-starter as @luxfi/app. Targets iOS/Android/web
(Expo) + desktop (Tauri). Drives luxfi/node + luxfi/ai. See README.

Co-authored-by: Hanzo Dev <[email protected]>
2026-06-01 23:30:05 -07:00

34 lines
962 B
TypeScript

import { useColorScheme } from 'react-native'
import { GuiProvider, type GuiProviderProps } from 'hanzogui'
import { ToastProvider, ToastViewport } from '@hanzogui/toast'
import { CurrentToast } from './CurrentToast'
import { config } from '../gui.config'
export function Provider({
children,
...rest
}: Omit<GuiProviderProps, 'config' | 'defaultTheme'>) {
const colorScheme = useColorScheme()
return (
<GuiProvider
config={config}
defaultTheme={colorScheme === 'dark' ? 'dark' : 'light'}
{...rest}
>
<ToastProvider
swipeDirection="horizontal"
duration={6000}
native={[
// uncomment the next line to do native toasts on mobile. NOTE: it'll require you making a dev build and won't work with Expo Go
// 'mobile'
]}
>
{children}
<CurrentToast />
<ToastViewport top="$8" left={0} right={0} />
</ToastProvider>
</GuiProvider>
)
}