add formik with submission handling

This commit is contained in:
Barry Gitarts 2018-05-22 15:44:33 -04:00
parent dbc88881a3
commit 834d5070fd
2 changed files with 3 additions and 14 deletions

View File

@ -2,6 +2,7 @@ import EmbarkJS from 'Embark/EmbarkJS';
import ENSSubdomainRegistry from 'Embark/contracts/ENSSubdomainRegistry';
import React, { Fragment } from 'react';
import { Form, FormGroup, FormControl, HelpBlock, Button, ControlLabel } from 'react-bootstrap';
import AddDomain from './ens/addDomain'
const FieldGroup = ({ id, label, help, ...props }) => (
<FormGroup controlId={id}>
@ -15,20 +16,7 @@ const ENSSubManagement = (props) => (
<Fragment>
<h2>Subdomain management</h2>
<h3>Add Domain</h3>
<form>
<FieldGroup
id="domainName"
type="text"
label="Domain Name"
/>
<FieldGroup
id="domainPrice"
type="number"
label="Domain Price"
placeholder="(Optional) Domain will be free if left blank"
/>
<Button type="submit">Submit</Button>
</form>
<AddDomain />
</Fragment>
)

View File

@ -20,6 +20,7 @@
"dependencies": {
"prop-types": "^15.6.1",
"eth-ens-namehash": "^2.0.8",
"formik": "^0.11.11",
"react": "^16.3.2",
"react-blockies": "^1.3.0",
"react-bootstrap": "^0.32.1",