diff --git a/components/index.ts b/components/index.ts index 11188036cc..9055860120 100644 --- a/components/index.ts +++ b/components/index.ts @@ -85,7 +85,7 @@ export type { LayoutProps, SiderProps } from './layout'; export { default as List } from './list'; export type { ListProps } from './list'; export { default as Mentions } from './mentions'; -export type { MentionProps } from './mentions'; +export type { MentionProps, MentionsProps } from './mentions'; export { default as Menu } from './menu'; export type { MenuItemProps, MenuProps, MenuRef, MenuTheme, SubMenuProps } from './menu'; export { default as message } from './message'; diff --git a/components/mentions/demo/prefix.tsx b/components/mentions/demo/prefix.tsx index b40312902d..1822af8165 100644 --- a/components/mentions/demo/prefix.tsx +++ b/components/mentions/demo/prefix.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { Mentions } from 'antd'; -import type { MentionProps } from 'antd'; +import type { MentionsProps } from 'antd'; const MOCK_DATA = { '@': ['afc163', 'zombiej', 'yesmeck'], @@ -12,7 +12,7 @@ type PrefixType = keyof typeof MOCK_DATA; const App: React.FC = () => { const [prefix, setPrefix] = useState('@'); - const onSearch: MentionProps['onSearch'] = (_, newPrefix) => { + const onSearch: MentionsProps['onSearch'] = (_, newPrefix) => { setPrefix(newPrefix as PrefixType); }; diff --git a/components/mentions/index.tsx b/components/mentions/index.tsx index 30a4a01cf4..28b461cfc6 100644 --- a/components/mentions/index.tsx +++ b/components/mentions/index.tsx @@ -52,6 +52,8 @@ export interface MentionProps extends Omit { variant?: Variant; } +export interface MentionsProps extends MentionProps {} + export interface MentionsRef extends RcMentionsRef {} interface MentionsConfig {