mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 09:21:22 +08:00
d32a1fe274
* fix(types): external module type error (CompoundedComponent) * refactor(types): rename and replace internal CompoundedComponent type
23 lines
637 B
TypeScript
23 lines
637 B
TypeScript
import type * as React from 'react';
|
|
import type { CheckboxProps } from './Checkbox';
|
|
import InternalCheckbox from './Checkbox';
|
|
import Group from './Group';
|
|
|
|
export type { CheckboxChangeEvent, CheckboxProps } from './Checkbox';
|
|
export type { CheckboxGroupProps, CheckboxOptionType } from './Group';
|
|
|
|
type CompoundedComponent = React.ForwardRefExoticComponent<
|
|
CheckboxProps & React.RefAttributes<HTMLInputElement>
|
|
> & {
|
|
Group: typeof Group;
|
|
/** @internal */
|
|
__ANT_CHECKBOX: boolean;
|
|
};
|
|
|
|
const Checkbox = InternalCheckbox as CompoundedComponent;
|
|
|
|
Checkbox.Group = Group;
|
|
Checkbox.__ANT_CHECKBOX = true;
|
|
|
|
export default Checkbox;
|