/** * @file 角标组件 */ import React from 'react'; import hoistNonReactStatic from 'hoist-non-react-statics'; import type { PickClassStyleType } from 'jamis-core'; import type { BadgeProps } from '../types'; declare const Badge: React.FC & { propsList?: string[]; }; export { Badge }; /** * @deprecated 切换到使用`useBadge` */ export declare function withBadge

(Component: React.ComponentType

): { new (props: (P & BadgeProps) | Readonly

): { ref: any; getWrappedInstance: () => any; refFn: (ref: any) => void; render(): JSX.Element; context: unknown; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly

) => (Pick<{}, K> | {} | null)) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly

; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly

, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly

, prevState: Readonly<{}>): any | null; componentDidUpdate?(prevProps: Readonly

, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly

, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly

, nextContext: any): void; componentWillUpdate?(nextProps: Readonly

, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly

, nextState: Readonly<{}>, nextContext: any): void; }; new (props: P & BadgeProps, context: any): { ref: any; getWrappedInstance: () => any; refFn: (ref: any) => void; render(): JSX.Element; context: unknown; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly

) => (Pick<{}, K> | {} | null)) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly

; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly

, nextState: Readonly<{}>, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly

, prevState: Readonly<{}>): any | null; componentDidUpdate?(prevProps: Readonly

, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly

, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly

, nextContext: any): void; componentWillUpdate?(nextProps: Readonly

, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly

, nextState: Readonly<{}>, nextContext: any): void; }; displayName: `WithBadge(${string})`; contextType?: React.Context | undefined; } & hoistNonReactStatic.NonReactStatics, {}>; export declare const useBadge: () => { wrapBadge: (children: T, badge?: BadgeProps["badge"], rest?: { data?: any; } & PickClassStyleType) => JSX.Element | T; };