mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 07:09:55 +08:00
502dac12aa
* docs: fix code * feat: lint * feat: prettier * feat: test * feat: review * feat: format html * feat: format html
30 lines
795 B
TypeScript
30 lines
795 B
TypeScript
import type * as React from 'react';
|
|
import type { CheckboxRef } from 'rc-checkbox';
|
|
|
|
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';
|
|
export type { CheckboxRef };
|
|
|
|
type CompoundedComponent = React.ForwardRefExoticComponent<
|
|
CheckboxProps & React.RefAttributes<CheckboxRef>
|
|
> & {
|
|
Group: typeof Group;
|
|
/** @internal */
|
|
__ANT_CHECKBOX: boolean;
|
|
};
|
|
|
|
const Checkbox = InternalCheckbox as CompoundedComponent;
|
|
|
|
Checkbox.Group = Group;
|
|
Checkbox.__ANT_CHECKBOX = true;
|
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
Checkbox.displayName = 'Checkbox';
|
|
}
|
|
|
|
export default Checkbox;
|