Skip to content

Commit 8cd3ce6

Browse files
committed
Add style components
1 parent 0184b12 commit 8cd3ce6

File tree

5 files changed

+54
-5
lines changed

5 files changed

+54
-5
lines changed

client/app/index.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ export default function Index() {
2121
alignItems: "center",
2222
}}
2323
>
24-
<PasswordModal callback={(pwd) => {messageManager.submitPassword(pwd)}}></PasswordModal>
24+
<PasswordModal callback={(pwd: string) => {messageManager.submitPassword(pwd)}}></PasswordModal>
2525

2626
<FlatList
2727
data={messages}
28-
renderItem={({item}) => <Message date={item.date.toLocaleString()} name={item.name} message={item.message} />}
29-
keyExtractor={(item, _) => item.id}
28+
renderItem={({item}: any) => <Message date={item.date.toLocaleString()} name={item.name} message={item.message} />}
29+
keyExtractor={(item: any, _) => item.id}
3030
>
3131

3232
</FlatList>

client/components.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"aliases": {
3+
"components": "~/components",
4+
"lib": "~/lib"
5+
}
6+
}

client/components/PasswordModal.jsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useState } from 'react';
2-
import { View, Modal, StyleSheet, Button, TextInput } from 'react-native';
2+
import { Input } from '~/components/ui/input';
3+
import { View, Modal, StyleSheet, Button } from 'react-native';
34

45
export function PasswordModal({callback}) {
56
const [modalVisible, setModalVisible] = useState(true);
@@ -9,7 +10,7 @@ export function PasswordModal({callback}) {
910
transparent={true}
1011
visible={modalVisible}>
1112
<View style={styles.centeredView}>
12-
<TextInput style={styles.textInput} secureTextEntry={true} onChangeText={setPassword}></TextInput>
13+
<Input style={styles.textInput} secureTextEntry={true} onChangeText={setPassword}></Input>
1314
<Button title='Submit' onPress={() => {
1415
setPassword("");
1516
callback(password);

client/package-lock.json

+40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
"@expo/vector-icons": "^14.0.2",
1919
"@react-navigation/bottom-tabs": "^7.2.0",
2020
"@react-navigation/native": "^7.0.14",
21+
"@rn-primitives/slot": "^1.1.0",
22+
"@rn-primitives/types": "^1.1.0",
2123
"expo": "~52.0.37",
2224
"expo-blur": "~14.0.3",
2325
"expo-constants": "~17.0.7",

0 commit comments

Comments
 (0)