/** * This is an interface for a hybrid component. * * Its public implementation is `@draftbit/native`, and it is injected inside * `@draftbit/ui`. */ import React from "react"; import { ViewProps, StyleProp, ImageStyle } from "react-native"; type Props = { name: string; color?: string; size: number; style?: StyleProp; } & ViewProps; export type IconI = React.ComponentType; export interface IconSlot { Icon: IconI; } type $Without = Pick>; export const injectIcon =

( Component: React.ComponentType

, Icon: IconI ) => React.forwardRef>((props, ref) => React.createElement(Component, { ...(props as unknown as P), Icon, ref }) );