0.2.6 • Published 10 months ago

react-native-sselect v0.2.6

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

react-native-sselect

A Customizable React Native Select

Installation

npm  install  react-native-sselect

--- or ---

yarn  add  react-native-sselect

Usage

Currently you have to wrap your form with SelectProvider this will handle to toggle selects when you have more than one.

  

import { Select, SelectProvider } from  'react-native-sselect';

export default function  App() {
	return (
		<View  style={styles.container}>
			<SelectProvider>
				<Select
				name="sample"
				options={[
					{ label: "Option 1", value: "option1" },
					{ label: "Option 2", value: "option2" },
				]} />
			</SelectProvider>
		</View>
	);
}

  

const  styles  = StyleSheet.create({
	container: {
		flex: 1,
		backgroundColor: "#fff",
		alignItems: "center",
		justifyContent: "center",
	},
});

Props

NameTypeRequired
namestringyes
options{name: string; value: string }[]yes
onChange({name: string; value: string }) ⇒ voidyes
defaultValue{name: string; value: string }
selectedValue{name: string; value: string }
optionsPlaceholderstring
optionsHeightnumber
colorstring
backgroundColorstring
placeholderstring
selectedOptionContainerStylestyle
optionsContainerStyle
optionsStyle

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.2.6

10 months ago

0.2.5

10 months ago

0.2.4

10 months ago

0.2.3

10 months ago

0.2.2

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.0

10 months ago