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.
react-native-country-picker-modal
Advanced tools
iOS | Android | Web |
---|---|---|
$ yarn add react-native-country-picker-modal
For more complete example open App.tsx
import React, { useState } from 'react'
import { View, Text, StyleSheet, PixelRatio, Switch } from 'react-native'
import CountryPicker from 'react-native-country-picker-modal'
import { CountryCode, Country } from './src/types'
const styles = StyleSheet.create({
// ...
})
export default function App() {
const [countryCode, setCountryCode] = useState<CountryCode>('FR')
const [country, setCountry] = useState<Country>(null)
const [withCountryNameButton, setWithCountryNameButton] = useState<boolean>(
false
)
const [withFlag, setWithFlag] = useState<boolean>(true)
const [withEmoji, setWithEmoji] = useState<boolean>(true)
const [withFilter, setWithFilter] = useState<boolean>(true)
const [withAlphaFilter, setWithAlphaFilter] = useState<boolean>(false)
const [withCallingCode, setWithCallingCode] = useState<boolean>(false)
const onSelect = (country: Country) => {
setCountryCode(country.cca2)
setCountry(country)
}
return (
<View style={styles.container}>
<Text style={styles.welcome}>Welcome to Country Picker !</Text>
<Option
title="With country name on button"
value={withCountryNameButton}
onValueChange={setWithCountryNameButton}
/>
<Option title="With flag" value={withFlag} onValueChange={setWithFlag} />
<Option
title="With emoji"
value={withEmoji}
onValueChange={setWithEmoji}
/>
<Option
title="With filter"
value={withFilter}
onValueChange={setWithFilter}
/>
<Option
title="With calling code"
value={withCallingCode}
onValueChange={setWithCallingCode}
/>
<Option
title="With alpha filter code"
value={withAlphaFilter}
onValueChange={setWithAlphaFilter}
/>
<CountryPicker
{...{
countryCode,
withFilter,
withFlag,
withCountryNameButton,
withAlphaFilter,
withCallingCode,
withEmoji,
onSelect
}}
visible
/>
<Text style={styles.instructions}>Press on the flag to open modal</Text>
{country !== null && (
<Text style={styles.data}>{JSON.stringify(country, null, 2)}</Text>
)}
</View>
)
}
countryCode
: CountryCoderegion?
:Regionsubregion?
: SubregioncountryCodes?
: Subregiontheme?
: Themetranslation?
: TranslationLanguageCodemodalProps?
: ModalPropsfilterProps?
: CountryFilterPropsflatListProps?
: FlatListPropswithAlphaFilter?
: booleanwithCallingCode?
: booleanwithCurrency?
: booleanwithEmoji?
: booleanwithCountryNameButton?
: booleanwithCurrencyButton?
: booleanwithCallingCodeButton?
: booleanwithFlagButton?
: booleanwithCloseButton?
: booleanwithFilter?
: booleanwithFlag?
: booleanwithModal?
: booleanvisible?
: booleancontainerButtonStyle?
: StyleProp<ViewStyle>
renderFlagButton?
(props: (FlagButton['props'])): ReactNode (FlagButton props)renderCountryFilter?
(props: CountryFilter['props']): ReactNode (CountryFilter props is TextInputProps)onSelect
(country: Country): void (Country)onOpen
(): voidonClose
(): voidcloseButtonImage?
: ImageSourcePropTypecloseButtonStyle?
: StylePropcloseButtonImageStyle?
: StyleProp
A simple example to display a CountryPicker
component with a dark theme.
import CountryPicker, { DARK_THEME } from 'react-native-country-picker-modal'
const MyDarkView = () => <CountryPicker theme={DARK_THEME} />
YES
YES : It used the world-countries package and image is stored into json and base64.
Feel free to contact me or create an issue
made with ♥
Looking for a ReactNative freelance expert with more than 12 years experience? Contact me from my website!
FAQs
react-native country picker
The npm package react-native-country-picker-modal receives a total of 64,380 weekly downloads. As such, react-native-country-picker-modal popularity was classified as popular.
We found that react-native-country-picker-modal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.