2023-09-11 17:28:04 +08:00
|
|
|
import * as React from 'react';
|
|
|
|
|
|
|
|
import { devUseWarning } from '../_util/warning';
|
|
|
|
|
|
|
|
export interface PropWarningProps {
|
|
|
|
dropdownMatchSelectWidth?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Warning for ConfigProviderProps.
|
|
|
|
* This will be empty function in production.
|
|
|
|
*/
|
|
|
|
const PropWarning = React.memo(({ dropdownMatchSelectWidth }: PropWarningProps) => {
|
2023-09-13 22:07:33 +08:00
|
|
|
const warning = devUseWarning('ConfigProvider');
|
2023-09-11 17:28:04 +08:00
|
|
|
|
2023-09-13 22:07:33 +08:00
|
|
|
warning.deprecated(
|
2023-09-11 17:28:04 +08:00
|
|
|
dropdownMatchSelectWidth === undefined,
|
2023-09-13 22:07:33 +08:00
|
|
|
'dropdownMatchSelectWidth',
|
|
|
|
'popupMatchSelectWidth',
|
2023-09-11 17:28:04 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
return null;
|
|
|
|
});
|
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
|
|
PropWarning.displayName = 'PropWarning';
|
|
|
|
}
|
|
|
|
|
|
|
|
export default process.env.NODE_ENV !== 'production' ? PropWarning : () => null;
|