@rws-air/webcomponents
Version:
Standard Webcomponents for AIR projects
38 lines • 1.43 kB
TypeScript
/// <reference types="react" />
import { SelectMenuOptionValues, SelectMenuProps } from '../SelectMenu';
/**
* Constructs a Select Menu with the formik validation
* @remark supports selecting multiple entries, active entries will have a checked Checkbox
* @param props Props to pass to the select menu component
* @example
* ```jsx
* const dropdownOptions = [{ value: 'JOHN', label: 'John'}, { value: 'CONNOR', label: 'Connor'}];
*
* <Field
* component={SelectMenuMultiple}
* name='type'
* type='text'
* required
* placeholder='Example Placeholder'
* variant='outlined'
* data-qa='sample-select-menu'
* label='Example'
* options={dropdownOptions}
* style={{ marginBottom: theme.spacing(5), height: values.selectMultiple.length ? 'unset' : null }}
* renderValue={(selected: unknown) => (
* <Box className={classes.chips}>
* {(selected as string[]).map((value) => (
* <Chip
* color='secondary'
* key={value}
* label={dropdownOptions.find((p) => p.value === value)?.label ?? 'Unknown'}
* className={classes.chip}
* size='small'
* />
* ))}
* </Box>
* />
* ```
*/
export declare const SelectMenuMultiple: <T extends SelectMenuOptionValues>({ label, options, placeholder, className, autoFocus, required, ...props }: SelectMenuProps<T>) => JSX.Element;
//# sourceMappingURL=index.d.ts.map