react-native-ui-lib
Version:
[](https://stand-with-ukraine.pp.ua)
344 lines (343 loc) • 17.3 kB
TypeScript
import React from 'react';
import { PickerProps } from '../types';
type UseFieldTypeProps = Pick<PickerProps, 'fieldType' | 'preset' | 'trailingAccessory' | 'value' | 'label' | 'placeholder' | 'style' | 'labelStyle' | 'testID'>;
declare const useFieldType: (props: UseFieldTypeProps) => {
propsByFieldType: {
preset: string | null;
containerStyle: {
flexDirection: string;
};
label: string | undefined;
labelStyle: {
color: string;
fontFamily?: string | undefined;
fontSize?: number | undefined;
fontStyle?: "normal" | "italic" | undefined;
fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined;
letterSpacing?: number | undefined;
lineHeight?: number | undefined;
textAlign?: "auto" | "left" | "right" | "center" | "justify" | undefined;
textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through" | undefined;
textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" | undefined;
textDecorationColor?: import("react-native/types").ColorValue | undefined;
textShadowColor?: import("react-native/types").ColorValue | undefined;
textShadowOffset?: {
width: number;
height: number;
} | undefined;
textShadowRadius?: number | undefined;
textTransform?: "none" | "capitalize" | "uppercase" | "lowercase" | undefined;
userSelect?: "auto" | "none" | "text" | "contain" | "all" | undefined;
fontVariant?: import("react-native/types").FontVariant[] | undefined;
writingDirection?: "auto" | "ltr" | "rtl" | undefined;
backfaceVisibility?: "visible" | "hidden" | undefined;
backgroundColor?: import("react-native/types").ColorValue | undefined;
borderBlockColor?: import("react-native/types").ColorValue | undefined;
borderBlockEndColor?: import("react-native/types").ColorValue | undefined;
borderBlockStartColor?: import("react-native/types").ColorValue | undefined;
borderBottomColor?: import("react-native/types").ColorValue | undefined;
borderBottomEndRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderBottomLeftRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderBottomRightRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderBottomStartRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderColor?: import("react-native/types").ColorValue | undefined;
borderCurve?: "circular" | "continuous" | undefined;
borderEndColor?: import("react-native/types").ColorValue | undefined;
borderEndEndRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderEndStartRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderLeftColor?: import("react-native/types").ColorValue | undefined;
borderRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderRightColor?: import("react-native/types").ColorValue | undefined;
borderStartColor?: import("react-native/types").ColorValue | undefined;
borderStartEndRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderStartStartRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderStyle?: "solid" | "dotted" | "dashed" | undefined;
borderTopColor?: import("react-native/types").ColorValue | undefined;
borderTopEndRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderTopLeftRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderTopRightRadius?: import("react-native/types").AnimatableNumericValue | undefined;
borderTopStartRadius?: import("react-native/types").AnimatableNumericValue | undefined;
opacity?: import("react-native/types").AnimatableNumericValue | undefined;
elevation?: number | undefined;
pointerEvents?: "auto" | "none" | "box-none" | "box-only" | undefined;
alignContent?: "center" | "flex-start" | "flex-end" | "stretch" | "space-between" | "space-around" | undefined;
alignItems?: import("react-native/types").FlexAlignType | undefined;
alignSelf?: "auto" | import("react-native/types").FlexAlignType | undefined;
aspectRatio?: string | number | undefined;
borderBottomWidth?: number | undefined;
borderEndWidth?: number | undefined;
borderLeftWidth?: number | undefined;
borderRightWidth?: number | undefined;
borderStartWidth?: number | undefined;
borderTopWidth?: number | undefined;
borderWidth?: number | undefined;
bottom?: import("react-native/types").DimensionValue | undefined;
display?: "none" | "flex" | undefined;
end?: import("react-native/types").DimensionValue | undefined;
flex?: number | undefined;
flexBasis?: import("react-native/types").DimensionValue | undefined;
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | undefined;
rowGap?: number | undefined;
gap?: number | undefined;
columnGap?: number | undefined;
flexGrow?: number | undefined;
flexShrink?: number | undefined;
flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
height?: import("react-native/types").DimensionValue | undefined;
justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | undefined;
left?: import("react-native/types").DimensionValue | undefined;
margin?: import("react-native/types").DimensionValue | undefined;
marginBottom?: import("react-native/types").DimensionValue | undefined;
marginEnd?: import("react-native/types").DimensionValue | undefined;
marginHorizontal?: import("react-native/types").DimensionValue | undefined;
marginLeft?: import("react-native/types").DimensionValue | undefined;
marginRight?: import("react-native/types").DimensionValue | undefined;
marginStart?: import("react-native/types").DimensionValue | undefined;
marginTop?: import("react-native/types").DimensionValue | undefined;
marginVertical?: import("react-native/types").DimensionValue | undefined;
maxHeight?: import("react-native/types").DimensionValue | undefined;
maxWidth?: import("react-native/types").DimensionValue | undefined;
minHeight?: import("react-native/types").DimensionValue | undefined;
minWidth?: import("react-native/types").DimensionValue | undefined;
overflow?: "visible" | "hidden" | "scroll" | undefined;
padding?: import("react-native/types").DimensionValue | undefined;
paddingBottom?: import("react-native/types").DimensionValue | undefined;
paddingEnd?: import("react-native/types").DimensionValue | undefined;
paddingHorizontal?: import("react-native/types").DimensionValue | undefined;
paddingLeft?: import("react-native/types").DimensionValue | undefined;
paddingRight?: import("react-native/types").DimensionValue | undefined;
paddingStart?: import("react-native/types").DimensionValue | undefined;
paddingTop?: import("react-native/types").DimensionValue | undefined;
paddingVertical?: import("react-native/types").DimensionValue | undefined;
position?: "absolute" | "relative" | undefined;
right?: import("react-native/types").DimensionValue | undefined;
start?: import("react-native/types").DimensionValue | undefined;
top?: import("react-native/types").DimensionValue | undefined;
width?: import("react-native/types").DimensionValue | undefined;
zIndex?: number | undefined;
direction?: "ltr" | "rtl" | "inherit" | undefined;
shadowColor?: import("react-native/types").ColorValue | undefined;
shadowOffset?: Readonly<{
width: number;
height: number;
}> | undefined;
shadowOpacity?: import("react-native/types").AnimatableNumericValue | undefined;
shadowRadius?: number | undefined;
transform?: string | (({
perspective: import("react-native/types").AnimatableNumericValue;
} & {
rotate?: undefined;
rotateX?: undefined;
rotateY?: undefined;
rotateZ?: undefined;
scale?: undefined;
scaleX?: undefined;
scaleY?: undefined;
translateX?: undefined;
translateY?: undefined;
skewX?: undefined;
skewY?: undefined;
matrix?: undefined;
}) | ({
rotate: import("react-native/types").AnimatableStringValue;
} & {
perspective?: undefined;
rotateX?: undefined;
rotateY?: undefined;
rotateZ?: undefined;
scale?: undefined;
scaleX?: undefined;
scaleY?: undefined;
translateX?: undefined;
translateY?: undefined;
skewX?: undefined;
skewY?: undefined;
matrix?: undefined;
}) | ({
rotateX: import("react-native/types").AnimatableStringValue;
} & {
perspective?: undefined;
rotate?: undefined;
rotateY?: undefined;
rotateZ?: undefined;
scale?: undefined;
scaleX?: undefined;
scaleY?: undefined;
translateX?: undefined;
translateY?: undefined;
skewX?: undefined;
skewY?: undefined;
matrix?: undefined;
}) | ({
rotateY: import("react-native/types").AnimatableStringValue;
} & {
perspective?: undefined;
rotate?: undefined;
rotateX?: undefined;
rotateZ?: undefined;
scale?: undefined;
scaleX?: undefined;
scaleY?: undefined;
translateX?: undefined;
translateY?: undefined;
skewX?: undefined;
skewY?: undefined;
matrix?: undefined;
}) | ({
rotateZ: import("react-native/types").AnimatableStringValue;
} & {
perspective?: undefined;
rotate?: undefined;
rotateX?: undefined;
rotateY?: undefined;
scale?: undefined;
scaleX?: undefined;
scaleY?: undefined;
translateX?: undefined;
translateY?: undefined;
skewX?: undefined;
skewY?: undefined;
matrix?: undefined;
}) | ({
scale: import("react-native/types").AnimatableNumericValue;
} & {
perspective?: undefined;
rotate?: undefined;
rotateX?: undefined;
rotateY?: undefined;
rotateZ?: undefined;
scaleX?: undefined;
scaleY?: undefined;
translateX?: undefined;
translateY?: undefined;
skewX?: undefined;
skewY?: undefined;
matrix?: undefined;
}) | ({
scaleX: import("react-native/types").AnimatableNumericValue;
} & {
perspective?: undefined;
rotate?: undefined;
rotateX?: undefined;
rotateY?: undefined;
rotateZ?: undefined;
scale?: undefined;
scaleY?: undefined;
translateX?: undefined;
translateY?: undefined;
skewX?: undefined;
skewY?: undefined;
matrix?: undefined;
}) | ({
scaleY: import("react-native/types").AnimatableNumericValue;
} & {
perspective?: undefined;
rotate?: undefined;
rotateX?: undefined;
rotateY?: undefined;
rotateZ?: undefined;
scale?: undefined;
scaleX?: undefined;
translateX?: undefined;
translateY?: undefined;
skewX?: undefined;
skewY?: undefined;
matrix?: undefined;
}) | ({
translateX: import("react-native/types").AnimatableNumericValue;
} & {
perspective?: undefined;
rotate?: undefined;
rotateX?: undefined;
rotateY?: undefined;
rotateZ?: undefined;
scale?: undefined;
scaleX?: undefined;
scaleY?: undefined;
translateY?: undefined;
skewX?: undefined;
skewY?: undefined;
matrix?: undefined;
}) | ({
translateY: import("react-native/types").AnimatableNumericValue;
} & {
perspective?: undefined;
rotate?: undefined;
rotateX?: undefined;
rotateY?: undefined;
rotateZ?: undefined;
scale?: undefined;
scaleX?: undefined;
scaleY?: undefined;
translateX?: undefined;
skewX?: undefined;
skewY?: undefined;
matrix?: undefined;
}) | ({
skewX: import("react-native/types").AnimatableStringValue;
} & {
perspective?: undefined;
rotate?: undefined;
rotateX?: undefined;
rotateY?: undefined;
rotateZ?: undefined;
scale?: undefined;
scaleX?: undefined;
scaleY?: undefined;
translateX?: undefined;
translateY?: undefined;
skewY?: undefined;
matrix?: undefined;
}) | ({
skewY: import("react-native/types").AnimatableStringValue;
} & {
perspective?: undefined;
rotate?: undefined;
rotateX?: undefined;
rotateY?: undefined;
rotateZ?: undefined;
scale?: undefined;
scaleX?: undefined;
scaleY?: undefined;
translateX?: undefined;
translateY?: undefined;
skewX?: undefined;
matrix?: undefined;
}) | ({
matrix: import("react-native/types").AnimatableNumericValue[];
} & {
perspective?: undefined;
rotate?: undefined;
rotateX?: undefined;
rotateY?: undefined;
rotateZ?: undefined;
scale?: undefined;
scaleX?: undefined;
scaleY?: undefined;
translateX?: undefined;
translateY?: undefined;
skewX?: undefined;
skewY?: undefined;
}))[] | undefined;
transformOrigin?: string | (string | number)[] | undefined;
transformMatrix?: number[] | undefined;
rotation?: import("react-native/types").AnimatableNumericValue | undefined;
scaleX?: import("react-native/types").AnimatableNumericValue | undefined;
scaleY?: import("react-native/types").AnimatableNumericValue | undefined;
translateX?: import("react-native/types").AnimatableNumericValue | undefined;
translateY?: import("react-native/types").AnimatableNumericValue | undefined;
textAlignVertical?: "auto" | "center" | "top" | "bottom" | undefined;
verticalAlign?: "auto" | "top" | "bottom" | "middle" | undefined;
includeFontPadding?: boolean | undefined;
};
trailingAccessory: React.JSX.Element;
} | {
preset: string | null;
label: undefined;
containerStyle?: undefined;
labelStyle?: undefined;
trailingAccessory?: undefined;
} | undefined;
pickerInnerInput: React.JSX.Element | undefined;
};
export default useFieldType;