二手掉包工程师
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
5 additions and
5 deletions
-
components/auto-complete/index.tsx
-
components/config-provider/context.tsx
-
components/input/Group.tsx
-
components/modal/useModal/HookModal.tsx
-
components/typography/Typography.tsx
|
|
@ -37,7 +37,7 @@ function isSelectOptionOrSelectOptGroup(child: any): Boolean { |
|
|
|
return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup); |
|
|
|
} |
|
|
|
|
|
|
|
const AutoComplete: React.RefForwardingComponent<Select, AutoCompleteProps> = (props, ref) => { |
|
|
|
const AutoComplete: React.ForwardRefRenderFunction<Select, AutoCompleteProps> = (props, ref) => { |
|
|
|
const { prefixCls: customizePrefixCls, className, children, dataSource } = props; |
|
|
|
const childNodes: React.ReactElement[] = toArray(children); |
|
|
|
|
|
|
|
|
|
@ -46,7 +46,7 @@ export const ConfigConsumer = ConfigContext.Consumer; |
|
|
|
// =========================== withConfigConsumer ===========================
|
|
|
|
// We need define many types here. So let's put in the block region
|
|
|
|
type IReactComponent<P = any> = |
|
|
|
| React.StatelessComponent<P> |
|
|
|
| React.FC<P> |
|
|
|
| React.ComponentClass<P> |
|
|
|
| React.ClassicComponentClass<P>; |
|
|
|
|
|
|
|
|
|
@ -15,7 +15,7 @@ export interface GroupProps { |
|
|
|
compact?: boolean; |
|
|
|
} |
|
|
|
|
|
|
|
const Group: React.StatelessComponent<GroupProps> = props => ( |
|
|
|
const Group: React.FC<GroupProps> = props => ( |
|
|
|
<ConfigConsumer> |
|
|
|
{({ getPrefixCls, direction }: ConfigConsumerProps) => { |
|
|
|
const { prefixCls: customizePrefixCls, className = '' } = props; |
|
|
|
|
|
@ -21,7 +21,7 @@ interface ModalLocale { |
|
|
|
justOkText: string; |
|
|
|
} |
|
|
|
|
|
|
|
const HookModal: React.RefForwardingComponent<HookModalRef, HookModalProps> = ( |
|
|
|
const HookModal: React.ForwardRefRenderFunction<HookModalRef, HookModalProps> = ( |
|
|
|
{ afterClose, config }, |
|
|
|
ref, |
|
|
|
) => { |
|
|
|
|
|
@ -19,7 +19,7 @@ interface InternalTypographyProps extends TypographyProps { |
|
|
|
setContentRef?: (node: HTMLElement) => void; |
|
|
|
} |
|
|
|
|
|
|
|
const Typography: React.RefForwardingComponent<{}, InternalTypographyProps> = ( |
|
|
|
const Typography: React.ForwardRefRenderFunction<{}, InternalTypographyProps> = ( |
|
|
|
{ |
|
|
|
prefixCls: customizePrefixCls, |
|
|
|
component = 'article', |
|
|
|