import { requireNativeModule, requireNativeViewManager, } from 'expo-modules-core'; import React from 'react'; import { type Color as ColorType } from '../../utils/colors'; import { getSizeFromModifiers, mapToNativeModifiers, } from '../../utils/modifiers'; import { onBaseEvent } from '../../utils/onBaseEvent'; import { ColorProps, ColorSubComponentProps, ColorView, NativeColorProps, } from './types'; const NativeColor: React.ComponentType = requireNativeViewManager('Color'); const ColorModule: { getColor: (color: ColorType) => string; } = requireNativeModule('Color'); const ColorSubComponent = ({ color, ...props }: ColorSubComponentProps) => { return ; }; export const Color: ColorView = ({ color, style, ...modifiers }: ColorProps) => { return ( { onBaseEvent(e, modifiers); }} color={color} /> ); }; Color.black = (props) => ; Color.blue = (props) => ; Color.brown = (props) => ; Color.clear = (props) => ; Color.cyan = (props) => ; Color.gray = (props) => ; Color.green = (props) => ; Color.indigo = (props) => ; Color.mint = (props) => ; Color.orange = (props) => ; Color.pink = (props) => ; Color.purple = (props) => ; Color.red = (props) => ; Color.teal = (props) => ; Color.white = (props) => ; Color.yellow = (props) => ; Color.accentColor = (props) => ( ); Color.primary = (props) => ; Color.secondary = (props) => ; export function getColor(color: ColorType): string | undefined { return ColorModule.getColor(color); }