Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
rn-credit-card-textinput
Advanced tools
A Fully customizable react-native credit card TextInput
I'm a full stack developer but I'm more Front-end inclined... I build awesome react and react-native apps!
To deploy this project run
npm install rn-credit-card-textinput
or
yarn add rn-credit-card-textinput
inherits all React-native TextInput Props
Prop | Type | Required |
---|---|---|
inputStyle | TextStyle | no |
labelStyle | TextStyle | no |
inputWrapStyle | ViewStyle | no |
cardInputContainerStyle | ViewStyle | no |
cardInputContainerStyle | ViewStyle | no |
errorColor | string | no |
labelColor | string | no |
focusColor | string | no |
defaultBorderColor | string | no |
placeholder | string | no |
error | string | no |
touched | boolean | no |
label | string | no |
value | string | no |
updateTextVal | func | yes |
updateCardDateText | func | yes |
import {useState} from "react";
import {KeyboardAvoidingView, Platform, StyleSheet, View} from 'react-native';
import {CardNumberTextInput, CardDateTextInput} from "../src/index";
export default function App() {
const [cardValue, setCardValue] = useState('');
const [focusCardNum, setFocusCardNum] = useState<boolean>(false);
const [cardDateValue, setCardDateValue] = useState('');
const [focusCardDateNum, setFocusCardDateNum] = useState<boolean>(false);
const updateText = (cardNum: string) => {
setCardValue(cardNum)
}
const updateCardDate = (cardNum: string) => {
setCardDateValue(cardNum)
}
return (
<View style={styles.container}>
<KeyboardAvoidingView behavior={Platform.OS === "ios" ? "padding" : "height"} style={{
width: '90%',
}}>
<CardNumberTextInput
autoFocus={true}
focus={focusCardNum}
onFocus={() => setFocusCardNum(true)}
onBlur={(e) => {
setFocusCardNum(false);
}}
label="Card number"
errorColor={"red"}
defaultBorderColor={"#ddd"}
inputWrapStyle={{
width:'100%',
height:60
}}
inputStyle={{
fontFamily: 'GT-medium',
color: '#333'
}}
defaultValue={cardValue}
focusColor={"blue"}
placeholder={"Credit card"}
updateTextVal={(text) => {
updateText(text)
}}/>
<CardDateTextInput
errorColor={"red"}
labelColor={"#ddd"}
focusColor={"#1c32a0"}
defaultBorderColor={"#ddd"}
placeholder={"MM/YY"}
label={"Expiry date"}
focus={focusCardDateNum}
updateCardDateText={(t) => {
updateCardDate(t)
}}
onFocus={() => setFocusCardDateNum(true)}
labelStyle={{
color: '#333',
fontWeight: '400'
}}
inputWrapStyle={{
borderRadius: 10,
borderWidth: 1,
}}
placeholderTextColor={"#ccc"}
value={cardDateValue}
defaultValue={cardDateValue}
inputStyle={{
color: '#333',
fontWeight: 'bold',
}}/>
</KeyboardAvoidingView>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
width: '100%',
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
FAQs
A fully customizable react native Credit card TextInput
We found that rn-credit-card-textinput demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.