Skip to content

Add array notation on styles props #140

@sebasbeleno

Description

@sebasbeleno

Hey There o/

When I try to use array notation on containerStyle I receive a typescript error.

Type '({ borderWidth: number; paddingHorizontal: number; borderColor: string; borderRadius: number; marginBottom: number; } | { height: number | null; })[]' has no properties in common with type 'ViewStyle'.

<FloatingLabelInput
    onBlur={onBlur}
    onChangeText={_value => onChange(_value)}
    value={value}
    label="Email"
    keyboardType="email-address"
    staticLabel
    containerStyles={[
        styles.inputContainer,
         {height: getFloatingInputHeight()},
    ]}
    customLabelStyles={{
        colorFocused: Colors.acent.brand,
        colorBlurred: Colors.neutral.white,
        fontSizeFocused: 12,
     }}
     labelStyles={styles.inputLabel}
     inputStyles={styles.inputStyle}
 />

The app runs correctly with the previous code but its annoying the ts error.

Note: I already fixed it on my local machine but I don't have permissions to send my branch :/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions