react-native-ios-context-menu/src/types/MenuIconConfig.ts
2021-11-21 06:03:35 +08:00

28 lines
593 B
TypeScript

import type { ImageResolvedAssetSource } from "react-native";
import type { DynamicColor } from './MiscTypes';
// TODO: Next Major Version - Rename to `MenuIconConfigDeprecated`
/**
* **Deprecated** - Use `ImageItemConfig` type instead.
* Used to configure the icons on a menu.
* */
export type IconConfig = {
iconType: 'NONE';
} | {
iconType: 'SYSTEM';
iconValue: string;
iconTint?: string | DynamicColor;
} | {
iconType: 'ASSET';
iconValue: string;
} | {
iconType: 'REQUIRE';
iconValue: ImageResolvedAssetSource;
};
export type IconType = IconConfig['iconType'];