Skip to content

Commit 7ecbc63

Browse files
committed
feat(navbar): add text input
1 parent 835ad22 commit 7ecbc63

File tree

1 file changed

+38
-28
lines changed

1 file changed

+38
-28
lines changed

app/src/components/ui/navbar.tsx

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import {
2+
Container,
23
Fullscreen,
34
Text,
45
} from '@react-three/uikit'
5-
import { Button } from '@react-three/uikit-default'
6+
import { Button, Defaults, Input } from '@react-three/uikit-default'
67
import { GithubIcon } from '@react-three/uikit-lucide'
78
import { IfInSessionMode, useXRStore } from '@react-three/xr'
89

@@ -11,34 +12,43 @@ export const Navbar = () => {
1112

1213
return (
1314
<IfInSessionMode deny={['immersive-ar', 'immersive-vr']}>
14-
<Fullscreen
15-
alignItems="flex-end"
16-
flexDirection="row"
17-
gap={8}
18-
justifyContent="center"
19-
paddingBottom={8}
20-
pointerEvents="listener"
21-
>
22-
<Button
23-
data-test-id="github"
24-
onClick={() => window.open('https://github.com/moeru-ai/n3p6', '_blank', 'noopener')}
25-
size="icon"
15+
<Defaults>
16+
<Fullscreen
17+
alignItems="flex-end"
18+
gap={8}
19+
justifyContent="center"
20+
padding={8}
21+
pointerEvents="listener"
2622
>
27-
<GithubIcon height={16} width={16} />
28-
</Button>
29-
<Button
30-
data-test-id="enter-vr"
31-
onClick={() => void store.enterVR()}
32-
>
33-
<Text>Enter VR</Text>
34-
</Button>
35-
<Button
36-
data-test-id="enter-ar"
37-
onClick={() => void store.enterAR()}
38-
>
39-
<Text>Enter AR</Text>
40-
</Button>
41-
</Fullscreen>
23+
<Container flexDirection="column" gap={8} lg={{ flexDirection: 'row' }}>
24+
<Input maxWidth={256} placeholder="Send message..." />
25+
<Container gap={8} justifyContent="center">
26+
<Button
27+
data-test-id="github"
28+
onClick={() => window.open('https://github.com/moeru-ai/n3p6', '_blank', 'noopener')}
29+
size="icon"
30+
variant="secondary"
31+
>
32+
<GithubIcon height={16} width={16} />
33+
</Button>
34+
<Button
35+
data-test-id="enter-vr"
36+
onClick={() => void store.enterVR()}
37+
variant="secondary"
38+
>
39+
<Text>Enter VR</Text>
40+
</Button>
41+
<Button
42+
data-test-id="enter-ar"
43+
onClick={() => void store.enterAR()}
44+
variant="secondary"
45+
>
46+
<Text>Enter AR</Text>
47+
</Button>
48+
</Container>
49+
</Container>
50+
</Fullscreen>
51+
</Defaults>
4252
</IfInSessionMode>
4353
)
4454
}

0 commit comments

Comments
 (0)