react-select#IndicatorProps TypeScript Examples

The following examples show how to use react-select#IndicatorProps. 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 vote down vote up
DropdownIndicator = <OptionType, IsMulti extends boolean = false>(
  props: IndicatorProps<OptionType, IsMulti>
): JSX.Element => {
  const { dropdownIndicator } = useStyles()
  return (
    <selectComponents.DropdownIndicator {...props}>
      <ChevronDownIcon sx={dropdownIndicator} />
    </selectComponents.DropdownIndicator>
  )
}
Example #2
Source File: ReactSelectCustomization.tsx    From ke with MIT License 5 votes vote down vote up
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function ClearIndicator<OptionType, IsMulti extends boolean = false>({
  innerProps,
  ...rest
}: IndicatorProps<OptionType, IsMulti>) {
  return <selectComponents.ClearIndicator {...rest} innerProps={{ ...innerProps, 'data-test-id': 'clear' }} />
}