UNPKG

react-native-inner-shadow

Version:

react native inner shadows with linear gradient design UI

81 lines 2.93 kB
import type { AnimatedProp, Color } from '@shopify/react-native-skia'; import type { ReactNode } from 'react'; import type { PressableProps, ViewProps, ViewStyle } from 'react-native'; export type ShadowViewProps = InnerShadowProps | LinearInnerShadowProps; export type ShadowProps = { inset?: boolean; shadowColor?: string; shadowOffset?: { width: number; height: number; }; shadowBlur?: number; shadowRadius?: number; shadowOpacity?: number; boxShadow?: string; reflectedLightColor?: string; reflectedLightOffset?: { width: number; height: number; }; reflectedLightBlur?: number; }; export interface InnerShadowProps extends ViewProps, ShadowProps { children?: ReactNode; isReflectedLightEnabled?: boolean; width?: number; height?: number; backgroundColor?: string; style?: ViewStyle; } export type LINEAR_DIRECTION = 'top' | 'bottom' | 'left' | 'right'; export type GradientLinearProps = { from?: LINEAR_DIRECTION; to?: LINEAR_DIRECTION; colors: AnimatedProp<Color[]>; }; export interface LinearInnerShadowProps extends InnerShadowProps, GradientLinearProps { } export type ShadowPressableProps = PressableProps & Omit<InnerShadowProps, 'inset'> & { shadowSpace?: number; initialDepth?: number; duration?: number; damping?: number; }; export type LinearShadowPressableProps = ShadowPressableProps & GradientLinearProps; export type ShadowToggleProps = ShadowPressableProps & { isActive?: boolean; activeColor?: string; }; export type LinearShadowToggleProps = ShadowToggleProps & GradientLinearProps; export type GetBackgroundColorProps = { backgroundColor?: string; styleBackground?: ViewStyle['backgroundColor']; }; export type GetBorderRadiusProps = { borderRadius?: ViewStyle['borderRadius']; borderTopStartRadius?: ViewStyle['borderTopStartRadius']; borderTopLeftRadius?: ViewStyle['borderTopLeftRadius']; borderTopEndRadius?: ViewStyle['borderTopEndRadius']; borderTopRightRadius?: ViewStyle['borderTopRightRadius']; borderBottomStartRadius?: ViewStyle['borderBottomStartRadius']; borderBottomLeftRadius?: ViewStyle['borderBottomLeftRadius']; borderBottomEndRadius?: ViewStyle['borderBottomEndRadius']; borderBottomRightRadius?: ViewStyle['borderBottomRightRadius']; }; export type ShadowPropertyConfig = Omit<ShadowProps, 'boxShadow' | 'shadowRadius' | 'shadowOpacity'>; export type ReflectedLightPositionConfig = { inset?: boolean; reflectedLightScale?: number; baseShadowOffset: number; }; export type GetOuterShadowOffsetProps = { elevation?: number; } & Omit<ShadowProps, 'reflectedLightColor' | 'reflectedLightOffset' | 'reflectedLightBlur'>; export type GetLinearDirectionProps = { width: number; height: number; from: LINEAR_DIRECTION; to: LINEAR_DIRECTION; }; //# sourceMappingURL=types.d.ts.map