2022-05-07 14:31:54 +08:00
|
|
|
import type * as React from 'react';
|
2023-09-12 11:38:40 +08:00
|
|
|
import type { CheckboxRef } from 'rc-checkbox';
|
2024-04-08 14:04:08 +08:00
|
|
|
|
2022-05-07 14:31:54 +08:00
|
|
|
import type { CheckboxProps } from './Checkbox';
|
|
|
|
import InternalCheckbox from './Checkbox';
|
2017-03-13 10:20:25 +08:00
|
|
|
import Group from './Group';
|
2016-06-30 10:05:29 +08:00
|
|
|
|
2022-11-09 12:28:04 +08:00
|
|
|
export type { CheckboxChangeEvent, CheckboxProps } from './Checkbox';
|
|
|
|
export type { CheckboxGroupProps, CheckboxOptionType } from './Group';
|
2023-09-12 11:38:40 +08:00
|
|
|
export type { CheckboxRef };
|
2017-09-25 22:14:49 +08:00
|
|
|
|
2022-11-19 16:56:23 +08:00
|
|
|
type CompoundedComponent = React.ForwardRefExoticComponent<
|
2023-09-12 11:38:40 +08:00
|
|
|
CheckboxProps & React.RefAttributes<CheckboxRef>
|
2022-11-19 16:56:23 +08:00
|
|
|
> & {
|
2020-11-20 08:58:14 +08:00
|
|
|
Group: typeof Group;
|
2022-09-30 14:26:41 +08:00
|
|
|
/** @internal */
|
2020-11-20 08:58:14 +08:00
|
|
|
__ANT_CHECKBOX: boolean;
|
2022-11-19 16:56:23 +08:00
|
|
|
};
|
2020-11-20 08:58:14 +08:00
|
|
|
|
|
|
|
const Checkbox = InternalCheckbox as CompoundedComponent;
|
|
|
|
|
2017-03-13 10:20:25 +08:00
|
|
|
Checkbox.Group = Group;
|
2020-11-20 08:58:14 +08:00
|
|
|
Checkbox.__ANT_CHECKBOX = true;
|
|
|
|
|
2023-01-08 21:30:41 +08:00
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
|
|
Checkbox.displayName = 'Checkbox';
|
|
|
|
}
|
|
|
|
|
2017-03-13 10:20:25 +08:00
|
|
|
export default Checkbox;
|