ant-design/components/checkbox/index.tsx
vagusX 38cf5e8a75
docs: unify component export file as index.tsx (#50013)
* docs: unify component export file as index.tsx

* docs: compatible with old anchors

* chore: clean

* test: update snapshot

* fix: window env

---------

Co-authored-by: Peach <scdzwyxst@gmail.com>
2024-07-23 22:22:24 +08:00

26 lines
647 B
TypeScript

import type { CheckboxRef } from 'rc-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 = typeof InternalCheckbox & {
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;