bhrott / react-native-masked-text

A pure javascript masked text and input text component for React-Native.
MIT License
1.6k stars 251 forks source link

Can't remove bottom border #67

Closed lcssanches closed 6 years ago

lcssanches commented 6 years ago

How can I remove those borders from TextInputMask?. "Celular" and "CPF" are components based on TextInputMask.

image

code:

<Item stackedLabel >
   <Label>Celular</Label>
    <InputPhone  />
</Item>
<Item stackedLabel >
    <Label>CPF</Label>
    <InputCPF value=''/>
</Item>
/* 
... 
*/
import React, { Component } from "react";
import { StyleSheet } from "react-native";

import { TextInputMask } from 'react-native-masked-text'

export default class InputCPF extends Component {
    constructor(props) {
        super(props);
    }

    state = {
        value: this.props.value
    };

    render() {
        return (
            <TextInputMask
                style={styles.field}
                type={'cpf'}
                value={this.state.value}
            />
        );
    }
}

const styles = StyleSheet.create({
    field: {
        fontSize: 17,
        width: '100%',
        borderWidth: 0,
    }
});
bhrott commented 6 years ago

Hi,

You can use your custom TextInput component. Look HERE

Enjoy =)