A simple and reusable Select component for React
The package can be installed via npm:
npm install r-simple-select --save
Or via yarn:
yarn add r-simple-select
The most basic use of the RsSelect can be described with:
import React from "react";
import RsSelect from "rs-select";
const Example = () => {
const options = ["First", "Second", {name: "Third", abbreviation: "3rd" }]
return (
<RsSelect
name={name} //id and name of select component
options={options} //Array or Array of Objects
title={title} //label's innerText
/>
);
};
The minimum use of the RsSelect:
<RsSelect name={name} options={options} />
In this case the title will be set with the name parameter
Licensed under MIT license, see LICENSE for the full license.