Last active
July 14, 2016 20:36
-
-
Save ronal2do/19902550b998264a67dea9681160855e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Form extends React.Component { | |
componentDidMount() { | |
new dgCidadesEstados({ | |
cidade: document.getElementById('cidade'), | |
estado: document.getElementById('estado'), | |
estadoVal: 'SP', | |
cidadeVal: 'São Paulo' | |
}) | |
} | |
render() { | |
return ( | |
<div className="padding-top"> | |
<form className="form-horizontal"> | |
<div className="form-group"> | |
<div className="col-sm-12"> | |
<input type="text" name="name" id="name" className="form-control" placeholder="Nome:" /> | |
</div> | |
</div> | |
<div className="form-group"> | |
<div className="col-sm-12"> | |
<input type="email" name="email" id="email" className="form-control" placeholder="E-mail:" /> | |
</div> | |
</div> | |
<div className="form-group"> | |
<div className="col-sm-6"> | |
<select name="estado" id="estado" className="form-control"></select> | |
</div> | |
<div className="col-sm-6"> | |
<select name="cidade" id="cidade" className="form-control"></select> | |
</div> | |
</div> | |
<div className="form-group"> | |
<div className="col-sm-12"> | |
<button type="submit" className="btn btn-success">Enviar</button> | |
</div> | |
</div> | |
</form> | |
</div> | |
); | |
} | |
} | |
export default (Form); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment