1.8.1 • Published 1 year ago

dropdown-menu_op v1.8.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

React simple dropdown component for a openclassroom project

Installation

To install, you can use npm:

npm i dropdown-menu_op

Usage

via file data

import React, { Component } from 'react'
import data from "assets/data.json";
import Dropdown_menu from "dropdown-menu_op";

<Dropdown_menu
	<Dropdown_menu
	name={"name"} // it is the name of the field and it's id
	required={"required"} //only if you want the field to be required
	datas={data} // the data you want to select from
	onChange={(e) => setState(e.target.value)} //the action on onChange
/>

via manual entry data

import React, { Component } from 'react'

import Dropdown_menu from "dropdown-menu_op";

<Dropdown_menu
	<Dropdown_menu
	name={"name"} // it is the name of the field and it's id
	required={"required"} //only if you want the field to be required
	datas=datas={[
		{ name: name1, value: value1 },
		{ name: name2, value: value2 },
	]} // the data you want to select from
	onChange={(e) => setState(e.target.value)} //the action on onChange
/>
1.8.1

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago