Remove cssKey param from CommonProps.cx (#45156)

cx is a classNames with the first parameter bound.

cssKey param was removed from classNames here: a860de4f99 (diff-b194f39baaee25481bb4ebca83fd3850L44)

`cx` now only takes 2 params as seen in usages through react-select
https://github.com/JedWatson/react-select/blob/master/packages/react-select/src/components/Group.js#L40

It's also not possible for classNames to return void.
This commit is contained in:
Mike Lin 2020-07-01 13:31:58 -07:00 committed by GitHub
parent 9421cff54b
commit 24aef4c156
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ export type ClassNamesState = { [key: string]: boolean } | undefined;
export interface CommonProps<OptionType extends OptionTypeBase> {
clearValue: () => void;
className?: string;
cx: (a: string | null, b: ClassNamesState | undefined, c: string | undefined) => string | void;
cx: (state: ClassNamesState | undefined, className: string | undefined) => string;
/*
Get the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.