import React from 'react'; import { TextStyle, ViewStyle, Insets, StyleProp } from 'react-native'; import { SpacingProps } from '../../../theme'; import { TestableProps } from '../../common/test'; export type CustomIconComponent = React.ComponentType<{ name: string; size?: number; color?: string; style?: StyleProp; onPress?: () => void; testID?: string; hitSlop?: Insets; accessibilityLabel?: string; [key: string]: any; }>; export type IconType = 'ionicons' | string; export interface IconProps extends SpacingProps, TestableProps { name: string; type?: IconType; size?: number; color?: 'primary' | 'secondary' | 'text' | 'textSecondary' | 'textDisabled' | 'error' | 'warning' | 'success' | 'info' | string; style?: StyleProp; disabled?: boolean; hitSlop?: Insets; accessibilityLabel?: string; onPress?: () => void; animationName?: 'none' | 'rotate'; animationIterations?: number; } /** * 注册自定义图标库 * @param name 图标库名称 * @param component 图标组件 */ export declare const registerIconLibrary: (name: string, component: CustomIconComponent) => void; /** * 注销自定义图标库 * @param name 图标库名称 */ export declare const unregisterIconLibrary: (name: string) => void; /** * 获取所有已注册的图标库名称 */ export declare const getRegisteredIconLibraries: () => string[]; /** * 检查图标库是否已注册 * @param name 图标库名称 */ export declare const isIconLibraryRegistered: (name: string) => boolean; export declare const Icon: React.ForwardRefExoticComponent>; export default Icon; //# sourceMappingURL=Icon.d.ts.map