native-base init

alpha
Jan Umbach 2022-12-01 23:15:42 +01:00
parent bb446ee307
commit 3238b61aef
4 changed files with 2816 additions and 28 deletions

2804
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,9 +14,11 @@
"dependencies": { "dependencies": {
"babel-preset-esnext": "^1.1.3", "babel-preset-esnext": "^1.1.3",
"babel-preset-react": "^6.24.1", "babel-preset-react": "^6.24.1",
"native-base": "^3.4.23",
"react": "^18.1.0", "react": "^18.1.0",
"react-dom": "18.1.0", "react-dom": "18.1.0",
"react-native": "0.70.6", "react-native": "0.70.6",
"react-native-safe-area-context": "^4.4.1",
"react-native-web": "^0.18.10" "react-native-web": "^0.18.10"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,6 +1,9 @@
import React, {useState} from 'react'; import React, {useState} from 'react';
import {Image, Text, StyleSheet} from 'react-native';
import {testt} from '@caj/configs/test'; import {NativeBaseProvider, Box, Input, Text} from 'native-base';
import {extendTheme} from 'native-base';
import {theme} from '@caj/configs/colors';
import imgSrc from '@caj/img/maimg.png'; import imgSrc from '@caj/img/maimg.png';
@ -15,27 +18,18 @@ const user: User = {
}; };
const App = () => { const App = () => {
const [titleText, setTitleText] = useState("Bird's Nest");
const bodyText =
'This is not really a bird nest. ' + user.name + ' - ' + testt.data;
const onPressTitle = () => {
setTitleText("Bird's Nest [pressed]");
};
return ( return (
<Text style={styles.baseText}> <NativeBaseProvider theme={theme}>
<Text style={styles.titleText} onPress={onPressTitle}> <Box>
{titleText} <Text> ma boyy :--)</Text>
{'\n'} </Box>
{'\n'} <Box alignItems="center">
</Text> <Input shadow={2} placeholder="Enter your name" />
<Text numberOfLines={5}>{bodyText}</Text> </Box>
<Image source={imgSrc} style={styles.image} /> </NativeBaseProvider>
</Text>
); );
}; };
/*
const styles = StyleSheet.create({ const styles = StyleSheet.create({
baseText: { baseText: {
fontFamily: 'Cochin', fontFamily: 'Cochin',
@ -49,6 +43,6 @@ const styles = StyleSheet.create({
height: 500, height: 500,
borderWidth: 1, borderWidth: 1,
}, },
}); });*/
export default App; export default App;

View File

@ -1,3 +1,3 @@
export const testt = { data: "hellow :33 liebe diese"}; export const testt = { data: "hellow :33 liebe diese ios"};