ListControls

Component

A component that renders a select dropdown with optional title.

Usage

<ListControls title="Select an option" onChange={handleOptionChange} />
// Render list controls with custom items
const items = [
  { value: 'option1', label: 'Option 1' },
  { value: 'option2', label: 'Option 2' },
];

<ListControls title="Select an option" items={items} onChange={handleOptionChange} />

Props

defaultValue?

The default value of the list controls.

type

Value

items?

The list of selectable items.

type

ListControlItem<Value>[]

default value

[]

onChange?

The callback function that is triggered when the value changes.

type

(value: Value) => void

title?

The title of the list controls.

type

string

value?

The value of the list controls.

type

Value | null