type(mentions): export interface MentionsProps (#49281)

* type(mentions): export interface MentionsProps

* type: fix
pull/49286/head
thinkasany 8 months ago committed by GitHub
parent ab1acc720e
commit 36d6d3d7f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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';

@ -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<PrefixType>('@');
const onSearch: MentionProps['onSearch'] = (_, newPrefix) => {
const onSearch: MentionsProps['onSearch'] = (_, newPrefix) => {
setPrefix(newPrefix as PrefixType);
};

@ -52,6 +52,8 @@ export interface MentionProps extends Omit<RcMentionsProps, 'suffix'> {
variant?: Variant;
}
export interface MentionsProps extends MentionProps {}
export interface MentionsRef extends RcMentionsRef {}
interface MentionsConfig {

Loading…
Cancel
Save