1.0.5 • Published 2 months ago

dropdown-styled v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Plugin dropdown-styled

This plugin allows you to display a selection element (select) with options from a list of elements. You can import a JS or JSON file.

Installation

You can install this plugin via npm using the following command:

npm install dropdown-styled

ou

yarn add dropdown-styled

Usage

import Select from 'dropdown-styled';

Then, you can use the Select component in your JSX code like this:

<Select
  name="exemple"
  textLabel="Exemple"
  options={[
    { text: 'Option 1', value: 'option1' },
    { text: 'Option 2', value: 'option2' },
  ]}
  value={selectedValue}
  onChange={handleChange}
/>

Make sure to replace selectedValue and handleChange with the appropriate values from your application.

Properties

  • name: String - The name of the selection element.
  • textLabel: String - The label text of the selection element.
  • options: Object array - An array of objects representing the options of the selection element. Each object should have the properties text and value.
  • value: String - The selected value of the selection element.
  • onChange: Function - The callback function called when the value of the selection element changes.

Licence

Laurie Shamseldin Musson

1.0.5

2 months ago

1.0.4

2 months ago

1.0.3

2 months ago

1.0.2

3 months ago

1.0.0

3 months ago