Files
ant-design/components/input/utils.ts
2024-09-19 03:30:19 +08:00

13 lines
339 B
TypeScript

import type { ReactNode } from 'react';
import type { InputProps } from './Input';
export function hasPrefixSuffix(props: {
prefix?: ReactNode;
suffix?: ReactNode;
allowClear?: InputProps['allowClear'];
showCount?: InputProps['showCount'];
}) {
return !!(props.prefix || props.suffix || props.allowClear || props.showCount);
}