@cimpress/react-components
Version:
React components to support the MCP styleguide
32 lines • 1.17 kB
TypeScript
import React, { ReactNode } from 'react';
import { Props } from 'react-select';
import { SelectWrapperProps } from '../SelectWrapper';
import { PublicComponentProps } from '../types';
export interface SelectProps extends SelectWrapperProps, Omit<Props, 'onBlur' | 'onFocus' | 'value'>, PublicComponentProps {
/**
* allowed validation states
*/
status?: 'success' | 'warning' | 'error';
/**
* A class name to append to the div that wraps the select component.
*/
containerClassName?: string;
/**
* Additional help text to display under the select field.
*/
helpText?: ReactNode;
/**
* Label for the select field. If you provide a `placeholder` (per react-select props), it will be used as the label.
*/
label?: string;
/**
* Used for tethering to the window. If set to true, the dropdown list will be hoisted to the body and positioned correctly.
*/
tether?: boolean;
/**
* Function to call on selection from the list
*/
onChange?: (e: any) => void;
}
export declare const Select: (props: SelectProps) => React.JSX.Element;
//# sourceMappingURL=Select.d.ts.map