aws-northstar
Version:
NorthStar Design System
36 lines (32 loc) • 2.02 kB
TypeScript
/** *******************************************************************************************************************
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. *
******************************************************************************************************************** */
import React, { FunctionComponent } from 'react';
import { SelectProps as MuiSelectProps } from '@material-ui/core/Select';
import { AriaBaseProps } from '../../props/common';
import { SelectBaseProps, SelectOption, StatusType } from './types';
export interface SelectProps extends SelectBaseProps, AriaBaseProps {
/** Currently selected option. Value is used to match which option will be selected */
selectedOption?: SelectOption;
/** Fired whenever the user selects an option. The event detail contains the current selectedId and selectedOption. */
onChange?: MuiSelectProps['onChange'];
/** Fired when the select is opened. */
onFocus?: (event?: React.FocusEvent<HTMLElement>) => void;
/** Fired when input focus is removed from the UI control. */
onBlur?: (event?: React.FocusEvent<HTMLElement>) => void;
}
/**
* Select components are used for collecting user provided information from a list of options.
*/
declare const Select: FunctionComponent<SelectProps>;
export default Select;
export type { SelectBaseProps, SelectOption, StatusType };