Skip to content

Files

Latest commit

author
Steve Marshall
Sep 24, 2018
3c37189 · Sep 24, 2018

History

History
36 lines (26 loc) · 1.15 KB

README.md

File metadata and controls

36 lines (26 loc) · 1.15 KB

DropdownContainer Component

This project was bootstrapped with Create React App.

Below you will find some information on how to perform common tasks.
You can find the Create React App guide here.

How To Install

  • Clone this repo to your local directory
  • Type "cd dropdowntextsearch" to enter the repo
  • Type "npm install" to install the repo and its dependencies
  • Type "npm run start" to begin the demo

Component Details

As displayed in /App.js, the DropdownContainer component accepts 3 props. The PropTypes diagram is below:

{
	title: PropTypes.string,
	options: PropTypes.arrayOf(
		PropTypes.shape({
			name: PropTypes.string,
			value: PropTypes.string
		})
	),
	action: PropTypes.func
}

The 'action' callback will pass an array of objects in the same format as 'options' as parameters. In the event no options were selected, an empty array will be passed through.

Author