MultiCombobox: Add basic docs and make story public (#100806)
* MutliCombobox: Add basic docs and make story public * Apply suggestions from code review Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com> --------- Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
This commit is contained in:
co-authored by
Alex Khomenko
parent
855eadcabd
commit
f15c961a90
@@ -0,0 +1,20 @@
|
||||
import { Meta, Preview, ArgTypes } from '@storybook/blocks';
|
||||
|
||||
import { MultiCombobox } from './MultiCombobox';
|
||||
|
||||
<Meta title="MDX|MultiCombobox" component={MultiCombobox} />
|
||||
|
||||
# MultiCombobox
|
||||
|
||||
The behavior of the MultiCombobox is similar to that of the Combobox, but it allows you to select multiple options. For all non-multi behaviors, see the Combobox documentation.
|
||||
|
||||
## "All" functionality
|
||||
|
||||
Use the prop `enableAllOption` to show the "All" option.
|
||||
|
||||
- If no filtering is applied, selecting "All" will select all options, returning the same array as the `options` prop.
|
||||
- With filtering, selecting "All" will choose the filtered subset of options.
|
||||
|
||||
## Props
|
||||
|
||||
<ArgTypes of={MultiCombobox} />
|
||||
+6
@@ -6,12 +6,18 @@ import { ComponentProps } from 'react';
|
||||
import { Field } from '../Forms/Field';
|
||||
|
||||
import { MultiCombobox } from './MultiCombobox';
|
||||
import mdx from './MultiCombobox.mdx';
|
||||
import { generateOptions, fakeSearchAPI, generateGroupingOptions } from './storyUtils';
|
||||
import { ComboboxOption } from './types';
|
||||
|
||||
const meta: Meta<typeof MultiCombobox> = {
|
||||
title: 'Forms/MultiCombobox',
|
||||
component: MultiCombobox,
|
||||
parameters: {
|
||||
docs: {
|
||||
page: mdx,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const loadOptionsAction = action('options called');
|
||||
Reference in New Issue
Block a user