Skip to content

Instantly share code, notes, and snippets.

@pratik-chakravorty
Created August 4, 2018 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pratik-chakravorty/e642c416c5b90c74069c59a59f854e4d to your computer and use it in GitHub Desktop.
Save pratik-chakravorty/e642c416c5b90c74069c59a59f854e4d to your computer and use it in GitHub Desktop.
import React, { Component } from "react";
import { Form, Button } from "semantic-ui-react";
const AddItem = props => {
return (
<Form>
<Form.Input
label="Enter Item Name"
type="text"
required={true}
value={props.item}
name="item"
onChange={props.handleChange}
placeholder="Item Name"
/>
<Form.Input
label="Enter Amount"
type="number"
required={true}
value={props.amount}
name="amount"
onChange={props.handleChange}
placeholder="Amount"
/>
<Button primary>Add</Button>
</Form>
);
};
export default AddItem;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment