## Usage

Install the "react-select" library using the below code

```sh
Install the "react-select" library:
```

```jsx
import React from "react";
import SelectBox from "./select-box";

<select>
  <option value="option1">Option 1</option>
  <option value="option2">Option 2</option>
  <option value="option3">Option 3</option>
</select>;
```
```sh
import React, { useState, useEffect } from "react";

const { Option } = Select;

function SelectBox({
  options,
  onChange,
  value,
  label = "label",
  field = "id",

  ...componentProps
}) {
  return (
    <div className="select-box" style={{ width: "150px" }}>
      <Select
        style={{ width: "100%" }}
        onChange={onChange}
        value={value}
        {...componentProps}
      >
        {options.map((option, key) => (
          <Option key={key} value={option[field]}>
            {option[label]}
          </Option>
        ))}
      </Select>
    </div>
  );
}

export default SelectBox;

```