add input component for meal item

This commit is contained in:
oscar 2023-03-18 12:25:02 +13:00
parent c4192ced47
commit b2fcdfe8cd
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,12 @@
import classes from "./Input.module.css";
const Input = (props) => {
return (
<div className={classes.input}>
<label htmlFor={props.input.id}>{props.label}</label>
<input id={props.input.id} {...props.input} />
</div>
);
};
export default Input;

View File

@ -0,0 +1,18 @@
.input {
display: flex;
align-items: center;
margin-bottom: 0.5rem;
}
.input label {
font-weight: bold;
margin-right: 1rem;
}
.input input {
width: 3rem;
border-radius: 5px;
border: 1px solid #ccc;
font: inherit;
padding-left: 0.5rem;
}