react-select#ControlProps TypeScript Examples
The following examples show how to use
react-select#ControlProps.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReactSelectCustomization.tsx From ke with MIT License | 6 votes |
Control = <OptionType, IsMulti extends boolean = false>({ innerRef, innerProps, isFocused, isDisabled, children, getStyles, ...props }: ControlProps<OptionType, IsMulti>): JSX.Element => { const styles = useMultiStyleConfig('SelectWidget', props) return ( <StylesProvider value={styles}> <Flex data-test-id="control" css={getStyles('control', props)} ref={innerRef} sx={{ ...styles.control, overflow: 'hidden', }} {...innerProps} {...(isFocused && { 'data-focus': true })} {...(isDisabled && { disabled: true })} > {children} </Flex> </StylesProvider> ) }
Example #2
Source File: Dropdown.tsx From contracts-ui with GNU General Public License v3.0 | 5 votes |
function Control<T>(props: ControlProps<DropdownOption<T>, false>) {
return <components.Control {...props} className={classes(props.className, 'min-h-0')} />;
}