@engie-group/fluid-design-system-react
Version:
Fluid Design System React
67 lines (66 loc) • 1.52 kB
TypeScript
import React from 'react';
/**
* @deprecated Select component is deprecated, please use FormItem component with native html <select></select> as child
*/
export declare const NJSelect: React.FC<ISelectProps>;
export interface ISelectProps {
/**
* Select id
*/
id?: string;
/**
* Select name
*/
name?: string;
/**
* Select label
*/
label?: string;
/**
* Select data
*/
data?: {
value?: string;
label: string;
disabled?: boolean;
selected?: boolean;
}[];
/**
* Aria label, for accessibility reasons
*/
ariaLabel?: string;
/**
* Aria labelled by, for accessibility reasons
*/
ariaLabelledBy?: string;
/**
* Select form id <br>
* The `<form>` element to associate the `<select>` with (its form owner). The value of this attribute must be the id of a `<form>` in the same document.
*/
form?: string;
/**
* Use default value over the selected props on options.
*/
defaultValue?: string;
/**
* Select placeholder
*/
placeholder?: string;
/**
* Whether select is required or not
*/
isRequired?: boolean;
/**
* Whether select is disabled or not
*/
isDisabled?: boolean;
/**
* Function called on select change
* @param event
*/
onChange?: (event: React.ChangeEvent<HTMLElement>) => void;
/**
* Optional additional className
*/
className?: string;
}