react-native-unistyles
Version:
Level up your React Native StyleSheet
15 lines (13 loc) • 415 B
text/typescript
export type ColorKeys<T> = {
[K in keyof T]: K extends string
? K extends `${string}color${string}` | `${string}Color${string}`
? K
: never
: never
}[keyof T]
export type UseUpdateVariantColorConfig<T extends Record<string, any>> = {
animateCallback?: (from: string, to: string) => void,
colorKey: ColorKeys<T>,
style: T,
secretKey: string | undefined
}