react-brazil
v2.3.1
Published
React JS Gantt
Downloads
20
Readme
react-brazil
React Brazil contains formatting, validators and mask for brazillian like apps
See the LIVE DEMO !
Modules:
- CPF
- CNPJ
- RG
- Inscrição Estadual
- Telefone e Celular
- CEP
- Currency (Dinheiro)
- Time (horas e minutos)
- Number (numero e ponto decimal)
- Placa de Carro
- Renavam
- Título de Eleitor
- Proceso Jurídico
Install
npm install --save react-brazil
Usage
import * as React from 'react'
import {BrazilFormatComponent , BrazilMaskComponent} from 'react-brazil'
class Example extends React.Component {
constructor(props){
super(props);
this.value = '12345678900';
this.format = 'cpf';
}
render () {
return (
<div>
<BrazilFormatComponent value={this.value} format={this.format}/>
<BrazilMaskComponent value={this.value} format={this.format}/>
<BrazilFormatComponent value="12345678900" format="cpf"/>
<BrazilMaskComponent value="12345678900" format="cpf"/>
</div>
)
}
}
Demo
Demo component files are included in Git Project.
Demo Project: [https://github.com/mariohmol/react-brazil/blob/master/example/)
Used as reference the pipes/validators from:
- https://github.com/mariohmol/js-brasil
- https://github.com/text-mask/text-mask/tree/master/react#readme
Developer Guide
Fork this project and following the instructions below:
npm install
cd example
npm install
to run the demo:
npm start
in the root foldernpm start
in theexample
folder the site will be at: localhost:3000
Todo
Create the validate component
<BrazilValidateComponent />
License
MIT © mariohmol