import { Meta, Canvas, ArgTypes } from '@storybook/addon-docs/blocks'
import * as NaturalLanguageOptionStory from './natural-language-option.stories'

<Meta title="pv-form/NaturalLanguageForm/NaturalLanguageSelect/NaturalLanguageOption" />

# NaturalLanguageOption

The type `NaturalLanguageOption` is used for `value`, `defaultValue` and `options` of the [NaturalLanguageSelect](/docs/pv-form-naturallanguageform-naturallanguageselect--docs).
It is also the type of the argument passed to the `onChange` -callback.

### Type Definition

`NaturalLanguageOption` takes a generic parameter that will define the type of the `value`. The default is `string | number`.

```tsx
type NaturalLanguageOption<T> = {
  value: T
  ...
}
```

<ArgTypes of={NaturalLanguageOptionStory} />
