summaryrefslogtreecommitdiffstats
path: root/frontend/components/CreateItem.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-05-10 16:02:07 -0400
committerWes Bos <wesbos@gmail.com>2018-05-10 16:02:07 -0400
commit632af35d8a0871ca8c1041d0e14d63e2b457d168 (patch)
tree6d3ccae3cb20a082e4e6ea6fd982152568000193 /frontend/components/CreateItem.js
parente0c628528142f26ce9a42ba4c3c5d2cb41114a56 (diff)
Styles
Diffstat (limited to 'frontend/components/CreateItem.js')
-rw-r--r--frontend/components/CreateItem.js19
1 files changed, 12 insertions, 7 deletions
diff --git a/frontend/components/CreateItem.js b/frontend/components/CreateItem.js
index 2aabb5b..b40932c 100644
--- a/frontend/components/CreateItem.js
+++ b/frontend/components/CreateItem.js
@@ -1,10 +1,9 @@
import React, { Component } from 'react';
import { Mutation } from 'react-apollo';
-import { CREATE_ITEM_MUTATION, ALL_ITEMS_QUERY } from '../queries/queries';
+import Router from 'next/router';
+import { CREATE_ITEM_MUTATION } from '../queries/queries';
import Error from './ErrorMessage';
import Form from './styles/Form';
-import PropTypes from 'prop-types';
-import Router from 'next/router';
import formatMoney from '../lib/formatMoney';
class CreateItem extends Component {
@@ -66,14 +65,20 @@ class CreateItem extends Component {
<h2>Sell an Item.</h2>
<Error error={error} />
<fieldset disabled={loading} aria-busy={loading}>
- <label>
+ <label htmlFor="file">
Image
- <input required onChange={this.uploadFile} type="file" accept=".png, .jpg, .jpeg" />
+ <input
+ required
+ id="file"
+ onChange={this.uploadFile}
+ type="file"
+ accept=".png, .jpg, .jpeg"
+ />
{this.state.image ? (
<img src={this.state.image} width="100" alt={this.state.title} />
) : null}
</label>
- <label>
+ <label htmlFor="title">
Title
<input
required
@@ -85,7 +90,7 @@ class CreateItem extends Component {
placeholder="Title"
/>
</label>
- <label>
+ <label htmlFor="price">
Price {this.state.price && formatMoney(this.state.price)}
<input
required