Pdf generate, enable text wrap and disable break words - css

When generating pdf file in the table. Is it possible to set to enable text wrap, but disable to break words? Beacuse now it wraps words and added hyphen.
I would like whole word give to the new line without wrap word. How to set it up?
This css works:
flexWrap: wrap, // wrap text
Some css properties cannot be applied:
overflowWrap: "break-word", // Object literal may only specify known properties, and 'overflowWrap' does not exist in type 'Style'.
wordBreak: "normal", // Object literal may only specify known properties, and 'wordBreak' does not exist in type 'Style'.
whiteSpace: "wrap", // Object literal may only specify known properties, and 'whiteSpace' does not exist in type 'Style'.
I use reactjs 17.0.2, react-pdf/renderer 3.0.1, types/react-pdf 5.7.2.
Code:
<Page size="A4" orientation="landscape" style={styles.page}>
<View style={styles.tableContainer}>
{/* -- Table Head: -- */}
<View style={styles.head}>
<Text style={{ ...styles.headCol, width: "8%" }}>{"State"}</Text>
<Text style={{ ...styles.headColLast, width: "24%" }}>{"Subject"}</Text> */}
</View>
{/* -- Table Body: -- */}
<View key={index} style={styles.row}>
<Text style={{ ...styles.rowCol, width: "8%" }}>Ok</Text>
<Text style={{ ...styles.rowColLast, width: "24%" }}>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</Text>
</View>
</View>
</Page>
// style:
const borderColor = "#90e5fc"
const paddingTopText = 3;
const paddingLeftText = 2;
const paddingRightText = 2;
const paddingBottomText = 2;
const rowHeight = 80;
Styles = {
page: {
fontFamily: "OpenSans",
fontSize: "9px",
lineHeight: 1.3,
flexDirection: "column",
paddingTop: 30,
paddingLeft: 30,
paddingRight: 30
},
tableContainer: {
flexDirection: "row",
flexWrap: "wrap", // nowrap
marginTop: 24,
borderColor: borderColor,
borderWidth: 2
},
head: {
flexDirection: "row",
borderBottomColor: borderColor,
borderBottomWidth: 1,
height: "auto",
textAlign: "left",
fontWeight: "bold",
flexGrow: 1,
margin: 0,
padding: 0
},
headCol: {
borderRightColor: borderColor,
borderRightWidth: 1,
paddingTop: paddingTopText,
paddingLeft: paddingLeftText,
paddingRight: paddingRightText,
paddingBottom: paddingBottomText
},
headColLast: {
paddingTop: paddingTopText,
paddingLeft: paddingLeftText,
paddingRight: paddingRightText,
paddingBottom: paddingBottomText
},
row: {
flexDirection: "row",
borderBottomColor: borderColor,
borderBottomWidth: 1,
height: rowHeight,
margin: 0,
padding: 0
},
rowCol: {
textAlign: "left",
borderRightColor: borderColor,
borderRightWidth: 1,
paddingTop: paddingTopText,
paddingLeft: paddingLeftText,
paddingRight: paddingRightText,
paddingBottom: paddingBottomText
},
rowColLast: {
textAlign: "left",
paddingTop: paddingTopText,
paddingLeft: paddingLeftText,
paddingRight: paddingRightText,
paddingBottom: 0
},
}

The following solution works. It doesn't wrap words and it doesn't add hyphen "-". Maybe somebody it helps.
export const chunkSubstr = (str, size) => {
const numChunks = Math.ceil(str.length / size);
const chunks = new Array(numChunks);
for (let i = 0, o = 0; i < numChunks; ++i, o += size) {
chunks[i] = str.substr(o, size);
}
return chunks;
};
Font.registerHyphenationCallback((word) => {
if (word.length > 16) {
return chunkSubstr(word, 14);
} else {
return [word];
}
});

Related

React Scroll button dosent change

I have never done alot of designing when it comes to scrolls in react but decided to try today. From my understand the way to do is to use a wrapper and the need for using a library is not needed. I dont understand why nothing happens to my scroll button?
import React, { useState } from 'react'
import ArrowCircleRightIcon from '#mui/icons-material/ArrowCircleRight';
const SendMessageUser = () => {
const styles = {
main: {
height: "100%",
position: "relative"
},
wrapper: {
height: "100%",
position: "relative",
"::-webkit-scrollbar": {
width: "20px"
},
"::-webkit-scrollbar-track": {
backgroundColor: "transparent"
},
"::-webkit-scrollbar-thumb": {
backgroundColor: "#d6dee1",
borderRadius: "20px",
border: "6px solid transparent",
backgroundClip: "content-box"
},
"::-webkit-scrollbar-thumb:hover": {
backgroundColor: "#a8bbbf"
}
},
textArea: {
height: "100%", overflowY: "auto", width: "100%", backgroundColor: "#fff", resize: "none", border: "none", outline: "none", padding: "10px 25px 10px 10px", fontSize: "15px",
}
};
const [message, setMessage] = useState("");
const handleChange = (event) => {
setMessage(event.target.value);
};
const sendMessage = (event) => {
event.preventDefault();
}
return (
<form className="send-message" onSubmit={(event) => sendMessage(event)} style={styles.main}>
<div style={styles.wrapper}>
<textarea spellcheck="false" data-gramm="false" data-gramm_editor="false" data-enable-grammarly="false" style={styles.textArea}>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed hendrerit, ipsum in hendrerit laoreet, ligula ipsum commodo nisl, eu commodo est nulla quis dolor.</textarea>
</div>
<ArrowCircleRightIcon color="primary" sx={{
position: "absolute",
top: 0,
right: 0,
transform: "rotate(-90deg)",
}} />
</form >
)
}
export default SendMessageUser

React Native - Flex Layout - text overflow issue

I have the following layout within a RN View:
The buttons on the left have a dynamic width applied to a surrounding wrapper view - as based on state there could be 1, 2 or 3 buttons. the width is applied by conditional styles. My issue is - whatever i do I cannot get the description box to wrap - the text wrapper takes on the full width of the screen rather than its available remaining width..
Code:
Here is the code structure:
<View
style={[FormStyles.prRowStrip, { width: "100%", flexGrow: 0, flexWrap: 0 }]}
>
<View style={RP_Styles.btnRow}>
<View
style={[
returnHeader_full() && RP_Styles.btnWrap,
returnHeader_two() && RP_Styles.btnWrap_two,
returnHeader_one() && RP_Styles.btnWrap_one
]}
>
<TouchableOpacity
style={[
RP_Styles.smlBtnWrap,
!hasSiteGuide() && HomeStyles.checkedInHide
]}
onPress={() => this.openDocument(this.state.locationSiteGuidePdf)}
>
<Image
style={RP_Styles.homeSegmentImg}
source={require("../images/icons/ico_site_guide.png")}
/>
<Text style={RP_Styles.homeSegmentText}>Guide</Text>
</TouchableOpacity>
<TouchableOpacity
style={[
RP_Styles.smlBtnWrap,
!hasInventoryItems() && HomeStyles.checkedInHide
]}
onPress={toggleELModal}
>
<Image
style={RP_Styles.homeSegmentImg}
source={require("../images/icons/ico_equip_guide.png")}
/>
<Text style={RP_Styles.homeSegmentText}>Equip</Text>
</TouchableOpacity>
<TouchableOpacity style={RP_Styles.smlBtnWrap} onPress={toggleIssueModal}>
<Image
style={RP_Styles.homeSegmentImg}
source={require("../images/icons/ico_issue_b.png")}
/>
<Text style={RP_Styles.homeSegmentText}>Issue</Text>
</TouchableOpacity>
</View>
<View style={RP_Styles.txtBlock}>
<Text style={[RP_Styles.locBlockTxt]}>
Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam
{this.state.currentMarkerName} - {this.state.currentMarkerDescription}
</Text>
</View>
</View>
</View>
Heres the relevant applied styles currently:
const RP_Styles = StyleSheet.create({
txtBlock: {
backgroundColor:'red',
flexDirection: 'column',
},
locBlockTxt: {
fontSize: 15,
color: '#f79431',
textTransform: 'uppercase',
fontWeight: '500',
flexWrap: 'wrap',
},
btnRow: {
paddingTop: 4,
paddingBottom: 10,
paddingHorizontal: 8,
flexDirection: 'row',
},
btnWrap: {
flexDirection: 'row',
width: '180',
},
btnWrap_two: {
flexDirection: 'row',
flexGrow:0,
flexShrink:0,
width:120,
},
btnWrap_one: {
flexDirection: 'row',
flexGrow:0,
flexShrink:0,
width:60,
},
flRow: {
flexDirection: 'row',
paddingHorizontal: 6,
paddingTop: 12,
marginVertical: 6,
},
firstRow: {
marginTop: 10,
},
)}
const Form_Styles = StyleSheet.create({
prRowStrip: {
backgroundColor: 'rgba(0,0,0,0.05)',
marginVertical: 3,
paddingVertical: 4,
paddingHorizontal: 5,
},
}
as you see there a few inline styles where i've tried adding various style classes - but this is where its at at the mo. Any help would be great-fully received!

Flexbox styling with React Native

Well I thought I was getting the hang of styling. Tested on several different sized phones and it all looked great. Then... I tested on an iPad. Several of my screens ran way off the page. I am using flex: 1 for the container so I don't understand why. Do iPads not respect flex: 1 or something? Or did I just royally mangle the layout code? I thought using the screen dimensions and % to calculate most things would work for responsive design.
Example, sign in screen. Bottom 2 buttons "Login" and "Home" run almost completely off iPad screen. On phone devices seem to display fine.
EDIT: Thank you so much for the answer! I have rewritten the code and it looks fabulous now on the ipad. I hope this code is an improvement, I have added it to the bottom. Now to rewrite ALL the screens facepalm
import React, { useState } from "react";
import {
Dimensions,
Image,
StyleSheet,
Text,
TextInput,
TouchableOpacity,
View,
} from "react-native";
import { auth } from '../../src/config'
import AppText from "../components/AppText";
import colors from "../config/colors";
import Constants from "expo-constants";
let width = Dimensions.get('window').width;
function SignIn( { navigation } ){
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [message, setMessage] = useState('');
function emailSignIn(email, password){
email = email.trim();
auth.signInWithEmailAndPassword(email, password)
.then(function(result) {
setMessage('');
}).catch(function(error) {
setMessage('Invalid Email or Password. Sorry :(');
});
}
function updateEmail(email){
setMessage('');
setEmail(email);
}
function updatePassword(password){
setMessage('');
setPassword(password);
}
return (
<View style={styles.container}>
<Image style={styles.image} source={require("../assets/logo.png")} />
<Image style={styles.rainbow} source={require("../assets/rainbow.png")} />
<View style={styles.bottom}>
<View style={styles.inputView}>
<TextInput
style={{width: width * 0.8, textAlign: "center", padding: width * 0.02}}
placeholder="E m a i l..."
placeholderTextColor="#003f5c"
onChangeText={(email) => updateEmail(email)}
autoCapitalize = 'none'
/>
</View>
<View style={styles.inputView2}>
<TextInput
style={{width: width * 0.8, textAlign: "center", padding: width * 0.02}}
placeholder="P a s s w o r d..."
placeholderTextColor="#003f5c"
secureTextEntry={true}
onChangeText={(password) => updatePassword(password)}
autoCapitalize = 'none'
/>
</View>
<TouchableOpacity onPress={()=> navigation.navigate('ForgotPassword')}>
<Text style={styles.forgot_button}>Forgot Password?</Text>
</TouchableOpacity>
<AppText style={styles.message}>{message}</AppText>
<TouchableOpacity onPress={()=>emailSignIn(email,password)} style={styles.appButtonContainer}>
<Text style={styles.appButtonText}>LOGIN</Text>
</TouchableOpacity>
<TouchableOpacity onPress={()=>navigation.navigate('StartScreen')} style={styles.appButtonContainer}>
<Text style={styles.appButtonText}>HOME</Text>
</TouchableOpacity>
</View>
</View>
);
}
export default SignIn;
const styles = StyleSheet.create({
appButtonContainer: {
elevation: 8,
backgroundColor: colors.purple,
borderRadius: 30,
borderWidth: 1,
paddingVertical: "3%",
width: width * 0.8,
marginBottom: 10,
},
appButtonText: {
fontSize: width * 0.04,
color: colors.white,
fontWeight: "bold",
alignSelf: "center",
textTransform: "uppercase",
letterSpacing: 10,
},
bottom: {
alignItems: "center",
marginTop: width * 0.8,
},
container: {
flex: 1,
backgroundColor: colors.white,
justifyContent: "center",
alignItems: "center",
marginTop: Constants.statusBarHeight,
},
forgot_button: {
height: width * 0.1,
fontWeight: "bold",
},
image: {
width: width* 0.5,
resizeMode: "contain",
position: "absolute",
top: -20,
},
inputView: {
backgroundColor: "#d9f1ff",
borderRadius: 30,
borderWidth: 1,
alignItems: "center",
justifyContent: "center",
marginBottom: width * 0.05,
},
inputView2: {
backgroundColor: "#ffffb8",
borderRadius: 30,
alignItems: "center",
justifyContent: "center",
borderWidth: 1,
marginBottom: 0,
},
message: {
color: colors.red,
marginTop: width * 0.05,
marginBottom: 10,
alignSelf: "center",
},
rainbow: {
position: "absolute",
top: "10%",
},
});
New styles:
const styles = StyleSheet.create({
appButtonContainer: {
elevation: 8,
backgroundColor: colors.purple,
borderRadius: 30,
borderWidth: 1,
justifyContent: "center",
marginHorizontal: "5%",
height: "25%",
},
appButtonText: {
fontSize: 18,
color: colors.white,
fontWeight: "bold",
alignSelf: "center",
textTransform: "uppercase",
letterSpacing: 10,
},
container: {
flex: 1,
backgroundColor: colors.white,
marginTop: Constants.statusBarHeight,
},
forgot_button: {
alignSelf: "center",
fontWeight: "bold",
},
image: {
height: 200,
width: 200,
},
imageContainer: {
flex: 2,
justifyContent: "center",
alignItems: "center",
},
inputButtons: {
flex: 1,
justifyContent: "space-around",
marginHorizontal: "10%",
},
inputView: {
backgroundColor: "#d9f1ff",
borderRadius: 30,
borderWidth: 1,
alignItems: "center",
justifyContent: "center",
height: "25%",
},
inputView2: {
backgroundColor: "#ffffb8",
borderRadius: 30,
alignItems: "center",
justifyContent: "center",
borderWidth: 1,
height: "25%",
},
message: {
color: colors.red,
alignSelf: "center",
},
rainbow: {
flex: 1,
width: "100%",
height: "100%",
position: "absolute",
},
rainbowImage: {
height: "60%",
position: "absolute",
top: "15%",
},
submitButtons: {
flex: 1,
justifyContent: "space-around",
},
});
You're getting a width from Dimensions at the top level of your file and then basing all of your layout calculations on this later on. This means that whenever this file is first parsed/run, that width will be calculated. That'll work if the device reports its width correctly on the first pass through the code (not guaranteed), but will break if it gets an unusual width during that pass (likely) and will definitely break if the window changes size or rotates.
Instead of basing all of your calculations on that static width, I suggest you look into leveraging Flexbox for dynamic layouts.
For example, at one point in your code, you set a TextInput to 80% of the view by doing width * 0.8. You could do the same thing by just setting the width to 80%:
export default function App() {
return (
<View style={{flex: 1, justifyContent: "center", alignItems: "center"}}>
<TextInput
style={{borderWidth: 1, width: "80%"}}
/>
</View>
);
}
Basically, try to do everything you can to get rid of relying on Dimensions unless you really need it. And, if you do need it, make sure you calculate it at the time you need it based on the current screen and not just at the first run of the app.

Placing image over view in react native

I'm trying to place my image over view that is already on other view but no success...
I had been trying to use position:'absolute' and more other options I had seen but it didn't work for me.
render() {
let locationFlag=Platform.OS === 'ios'?true:false
return (
<View style={styles.container}>
<LinearGradient
colors={[ '#75a4e7','#7d50f6']}
start={{x: .2, y: 1}}
end={{x:.8,y:0}}
locations={locationFlag?[.15,1]:[.18,2.1]}
style={styles.gradient}>
<View style={styles.profilePhotoContainer}>
<TouchableOpacity onPress={this.handleEditProfileImage.bind(this)}>
<Image
style={styles.profileImage}
source={this.state.profilePhoto}
/>
</TouchableOpacity>
</View>
</LinearGradient>
<View style={
[styles.profileBox]}
>
</View>
</View>
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'flex-start',
alignSelf: 'stretch',
backgroundColor: Colors.LIGHT_GRAY
},
gradient: {
alignSelf: 'stretch',
alignItems: 'center',
flexDirection: 'column',
height: Dimensions.get('window').height * .35,
},
profilePhotoContainer: {
zIndex: 50,
position: 'absolute',
backgroundColor:'blue',
top: Dimensions.get('window').height * .12,
elevation: 4,
},
profileImage: {
zIndex: 5,
width: 100,
height: 100,
borderRadius: 50,
borderWidth: 4,
borderColor: '#FFF',
backgroundColor: 'transparent',
},
profileBox: {
zIndex: 1,
position: 'absolute',
left: Dimensions.get('window').width * .07,
top: Dimensions.get('window').height * .18,
borderRadius: 8,
shadowRadius: 8,
elevation: 3,
shadowOpacity: 0.3,
backgroundColor: 'yellow',
width: Dimensions.get('window').width * .86,
height: Dimensions.get('window').height * .50,
}
In the link you can see what did I do so far and what is the issue:
https://imgur.com/a/kC4ZTUn
I want to achieve this situation:
https://imgur.com/a/KMSRVfZ
Thank you
You should take the View with the profilePhotoContainer style out from the LinearGradient view and then it will work perfectly!
Here is a sample code to achieve similar to the design,
<View style={{flex: 1}}>
<View style={{flex:0.33,backgroundColor:"aqua",justifyContent:"center",alignItems:"center"}}>
<View style={{position:"absolute",backgroundColor:"grey",height:200,width:100,borderRadius:5,left:0.23*width,top:0.25*height}}/> {/*Represents the box where you add user name, profession etc */}
<View style={{backgroundColor:"yellow",height:50,width:50,borderRadius:25}}/> {/*Image tag goes here */}
</View>
</View>
I don't feel the necessity to add position:"absolute" prop for the profilePhotoContainerthe positioning can be controlled by flex principles. You may require only one view with position:"absolute" prop.
Do comment if you require further assistance.
Get some help from this-
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Image,
TouchableOpacity
} from 'react-native';
export default class Profile extends Component {
render() {
return (
<View style={styles.container}>
<View style={styles.header}></View>
<Image style={styles.avatar} source={{uri: 'https://bootdey.com/img/Content/avatar/avatar6.png'}}/>
<View style={styles.body}>
<View style={styles.bodyContent}>
<Text style={styles.name}>John Doe</Text>
<Text style={styles.info}>UX Designer / Mobile developer</Text>
<Text style={styles.description}>Lorem ipsum dolor sit amet, saepe sapientem eu nam. Qui ne assum electram expetendis, omittam deseruisse consequuntur ius an,</Text>
<TouchableOpacity style={styles.buttonContainer}>
<Text>Opcion 1</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.buttonContainer}>
<Text>Opcion 2</Text>
</TouchableOpacity>
</View>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
header:{
backgroundColor: "#00BFFF",
height:200,
},
avatar: {
width: 130,
height: 130,
borderRadius: 63,
borderWidth: 4,
borderColor: "white",
marginBottom:10,
alignSelf:'center',
position: 'absolute',
marginTop:130
},
name:{
fontSize:22,
color:"#FFFFFF",
fontWeight:'600',
},
body:{
marginTop:40,
},
bodyContent: {
flex: 1,
alignItems: 'center',
padding:30,
},
name:{
fontSize:28,
color: "#696969",
fontWeight: "600"
},
info:{
fontSize:16,
color: "#00BFFF",
marginTop:10
},
description:{
fontSize:16,
color: "#696969",
marginTop:10,
textAlign: 'center'
},
buttonContainer: {
marginTop:10,
height:45,
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
marginBottom:20,
width:250,
borderRadius:30,
backgroundColor: "#00BFFF",
},
});

Enable overflow in native-base cards

I have a component in a website that looks like this:
Regular card
It's basically a div with an image inside it, but the image has a margin-top of -50 so that it overflows off the card.
I would like to accomplish the same thing with react-native and native-base. Here is the relevant code:
render() {
return (
<View style={styles.container}>
<Card>
<CardItem style={{ marginTop: -50, justifyContent: 'center' }}>
<Image style={styles.image} source={{ uri: this.state.band.imageComponent.link }} />
</CardItem>
</Card>
</View>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
marginTop: 150
},
image: {
width: 150,
height: 150,
)
And the result looks like this:
React-native card
As you can see, the picture is cutoff at the top. How can I keep the image overflow and have it overlay the card like in my first image?
Overflow is not supported in Android. There are lots of open issues for that. Check some of them here and here.
Here's an npm package that apparently solves that issue that you could try.
Otherwise you can use a workaround for that I found on this medium post.
According to your image you have to wrap your image and the container inside another View as siblings and then position them absolutely.
Here's the code that I tweaked a little bit from that post. You can replace the View according to your Card and CardItem styles.
<View style={styles.container}>
<View style={styles.cardSection1}>
<Image style={styles.image} source={{ uri: 'https://imgplaceholder.com/420x320/ff7f7f/333333/fa-image' }} />
</View>
<View style={styles.cardSection2}>
</View>
</View>
const styles = {
container: {
flex: 1,
backgroundColor: 'grey',
alignItems: 'center'
},
image: {
width: 150,
height: 150,
},
cardSection1: {
alignItems: 'center',
justifyContent: 'center',
position: 'absolute',
width: 100,
height: 100,
borderRadius: 50 / 2,
zIndex: 2,
shadowColor: '#000',
shadowOffset: { width: 0, height: 0 },
shadowOpacity: 0.2,
shadowRadius: 10,
elevation: 7,
},
cardSection2: {
alignItems: 'center',
justifyContent: 'center',
position: 'absolute',
top: 25,
width: 300,
height: 150,
borderRadius: 8,
backgroundColor: 'white',
zIndex: 1,
shadowColor: '#000',
shadowOffset: { width: 0, height: 0 },
shadowOpacity: 0.2,
shadowRadius: 10,
elevation: 5,
}
}
This is the output that I got.
//import liraries
import React, { Component } from 'react';
import { View, Text, StyleSheet,TextInput,Dimensions,Image } from 'react-native';
import ButtonRoundBorder from '../components/ButtonRoundBorder';
const window = Dimensions.get('window')
// create a component
class Login extends Component {
render() {
return (
<View style={styles.container}>
<Image style={{width:window.width,height:window.height,position:'absolute'}} source={require('../images/bg2.jpeg')}/>
<View style={styles.overlayImageStyle} >
<Image style={{flex:1,borderRadius:80}} resizeMode={'contain'} source={require('../images/profile.jpg')} />
</View>
<View style={styles.cardStyle}>
<View style={styles.insideCard}>
<Text style={{fontWeight:'bold',fontSize:20,alignSelf:'center'}}>Login</Text>
<TextInput style={[styles.textInputStyle,{marginTop:30}]} underlineColorAndroid='#000000' placeholder='Enter Email' />
<TextInput style={[styles.textInputStyle,{marginTop:20}]} underlineColorAndroid='#000000' placeholder='Enter Password' />
<ButtonRoundBorder style={{marginTop:40}} title='Login'/>
</View>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container:{
flex: 1,
alignItems: 'center',
backgroundColor: 'transparent',
},
overlayImageStyle:{
alignItems: 'center',
justifyContent: 'center',
position: 'absolute',
width: 100,
height: 100,
borderRadius: 100/2,
backgroundColor: 'white',
top:50,
shadowColor: '#000',
// position: 'absolute',row
// shadowOpacity: 0.2,
// shadowRadius: 10,
elevation: 7,
},
cardStyle:{
// alignItems: 'center',
// justifyContent: 'center',
// position: 'absolute',
top: 80,
width: window.width - 40,
height: window.height - 200,
borderRadius: 8,
backgroundColor: 'white',
// backgroundColor: '#7E57C2',
shadowColor: '#000',
elevation: 5,
},
insideCard:{
top: 80,
alignContent: 'center',
justifyContent: 'center',
flexDirection:'column',
},
textInputStyle:{
width:300,
height:40,
alignSelf:'center',
}
});
//make this component available to the app
export default Login;
here is the link for screenshot

Resources