Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/RawItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import { clsx } from 'clsx';
import Item from './Item';
import { OverflowContext } from './context';

export type ComponentType =
| React.ComponentType<any>
| React.ForwardRefExoticComponent<any>
| React.FC<any>
| keyof HTMLElementTagNameMap;
// `React.ReactHTML` was removed in @types/react 19, while `keyof HTMLElementTagNameMap`
// requires the consumer to include the DOM lib. `React.ElementType` covers intrinsic
// tags plus function/class/forwardRef components in every supported @types/react range.
export type ComponentType = React.ElementType;

export interface RawItemProps extends React.HTMLAttributes<any> {
component?: ComponentType;
Expand Down
2 changes: 1 addition & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';

export const OverflowContext = React.createContext<{
prefixCls: string;
Expand Down
Loading